#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Mikan ビューレット パッケージ

Mikan Python Web Framework
"""

__author__ = "K.Sonohara"
__status__ = "develop"
__version__ = "0.0.0_24"
__date__    = "2013/07/14"
__license__ = 'LGPL'

# ------------------------------------------------------------
## インポート
# ------------------------------------------------------------
# Python
import sys
import os
import ConfigParser
import json
import mimetypes
import traceback
from abc import ABCMeta, abstractmethod

# XML
from xml.dom import minidom
from xml.dom.minidom import getDOMImplementation

# ESiPC
from esipc import ESiPCProperty

# Mikan
from mikan.core import AbstractMikanPerform

# ------------------------------------------------------------
## 変数
# ------------------------------------------------------------

# ------------------------------------------------------------
## 関数
# ------------------------------------------------------------

# ------------------------------------------------------------
## クラス
# ------------------------------------------------------------

# ------------------------------------------------------------
## Mikan メニュー アイテム クラス
#
class MikanMenuItem(object):

	def set_name(self, value):
		self.FName = value

	def get_name(self):
		return self.FName

	def set_title(self, value):
		self.FTitle = value

	def get_title(self):
		return self.FTitle

	def set_url(self, value):
		self.FURL = value

	def get_url(self):
		return self.FURL

	def set_icon(self, value):
		self.FIcon = value

	def get_icon(self):
		return self.FIcon

	def set_target(self, value):
		self.FTarget = value

	def get_target(self):
		return self.FTarget

	def get_menus(self):
		return self.FMenus

	def __init__(self, title, url, icon, target="_self"):
		super(MikanMenuItem, self).__init__()

		self.FName = None
		self.FTitle = title
		self.FURL = url
		self.FIcon = icon
		self.FTarget = target

		self.FMenus = []

	# ----------------------------------------------------
	## Property
	target = ESiPCProperty(get_target, set_target, None)
	icon = ESiPCProperty(get_icon, set_icon, None)
	url = ESiPCProperty(get_url, set_url, None)
	name = ESiPCProperty(get_name, set_name, None)
	title = ESiPCProperty(get_title, set_title, None)
	menus = ESiPCProperty(get_menus, None, None)

# ------------------------------------------------------------
## Mikan メニュー アイテム クラス
#
class MikanHeaderButtonItem(object):

	def set_name(self, value):
		self.FName = value

	def get_name(self):
		return self.FName

	def set_title(self, value):
		self.FTitle = value

	def get_title(self):
		return self.FTitle

	def set_url(self, value):
		self.FURL = value

	def get_url(self):
		return self.FURL

	def set_icon(self, value):
		self.FIcon = value

	def get_icon(self):
		return self.FIcon

	def set_target(self, value):
		self.FTarget = value

	def get_target(self):
		return self.FTarget

	def set_onclick(self, value):
		self.FOnClick = value

	def get_onclick(self):
		return self.FOnClick

	def __init__(self, title, url="javascript:void(0);", icon=None, target="_self", onclick=None):
		super(MikanHeaderButtonItem, self).__init__()

		self.FTitle = title
		self.FURL = url
		self.FIcon = icon
		self.FTarget = target
		self.FOnClick = onclick

	# ----------------------------------------------------
	## Property
	onclick = ESiPCProperty(get_onclick, set_onclick, None)
	target = ESiPCProperty(get_target, set_target, None)
	icon = ESiPCProperty(get_icon, set_icon, None)
	url = ESiPCProperty(get_url, set_url, None)
	name = ESiPCProperty(get_name, set_name, None)
	title = ESiPCProperty(get_title, set_title, None)

# ------------------------------------------------------------
## Mikan ビューレット クラス
#
class AbstractMikanViewlet(AbstractMikanPerform):
	__metaclass__ = ABCMeta

	def get_parent(self):
		return self.FParent

	def __init__(self, parent):
		super(AbstractMikanViewlet, self).__init__(parent.request)

		self.FParent = parent
		if (parent != None):
			if (isinstance(parent, MikanViewlet)):
				if (parent.performs != None):
					parent.performs.append(self)

	@abstractmethod
	def get_view(self):
		pass

	# ----------------------------------------------------
	## Property
	view = ESiPCProperty(get_view, None, None)
	parent = ESiPCProperty(get_parent, None, None)

# ------------------------------------------------------------
## Mikan ビューレット クラス
#
class MikanViewlet(AbstractMikanViewlet):

	def get_xml(self):
		if self.parent <> None:
			return self.parent.xml
		return None

	def set_element(self, value):
		self.FElement = value

	def get_element(self):
		return self.FElement

	def set_visible(self, value):
		self.FVisible = value

	def is_visible(self):
		return self.FVisible

	def get_xhtmlview(self):
		return self.parent.xhtmlview

	def get_htmlview(self):
		return self.parent.htmlview

	def get_view(self):
		return self.xhtmlview

	def __init__(self, parent):
		super(MikanViewlet, self).__init__(parent)

		self.FElement = None
		self.FVisible = True

	def create_element(self, name):
		element = self.xml.createElement(name)
		self.element = element

		return element

	def create_element_append(self, name):
		element = self.create_element(name)
		if(self.parent != None):
			if(self.parent.element != None):
				self.parent.element.appendChild(self.element)

		return element

	def prepare(self):
		if self.isvisible:
			return super(MikanViewlet, self).prepare()
		return False

	# ----------------------------------------------------
	## Property
	element = ESiPCProperty(get_element, set_element, None)
	xml = ESiPCProperty(get_xml, None, None)
	xhtmlview = ESiPCProperty(get_xhtmlview, None, None)
	htmlview = ESiPCProperty(get_htmlview, None, None)
	isvisible = ESiPCProperty(is_visible, set_visible, None)

class MikanHTMLViewlet(MikanViewlet):
	xmlns = u"http://www.w3.org/1999/xhtml"
	lang = "ja"

	def __init__(self, htmlview):
		self.FHTMLView = htmlview

		super(MikanHTMLViewlet, self).__init__(htmlview)

	def perform(self):
		dom = getDOMImplementation()
		self.htmlview.xml = dom.createDocument(self.xmlns, "html", None)
		self.element = self.htmlview.xml.documentElement

		self.element.setAttribute("xmlns", self.xmlns)
		self.element.setAttributeNS("xml", "lang", self.lang)
		self.element.setAttribute("lang", self.lang)

		return super(MikanHTMLViewlet, self).perform()

	def get_xml(self):
		return self.htmlview.xml

	def get_request(self):
		return self.htmlview.request

	def get_parent(self):
		return self

	def get_xhtmlview(self):
		return self.FHTMLView

	def get_htmlview(self):
		return self.xhtmlview

	# ----------------------------------------------------
	## Property
	xml = ESiPCProperty(get_xml, None, None)
	htmlview = ESiPCProperty(get_htmlview, None, None)
	xhtmlview = ESiPCProperty(get_xhtmlview, None, None)

class MikanTextViewlet(MikanViewlet):

	def get_default_nodevalue(self):
		if len(self.performs) > 0:
			return None
		return " "

	def get_nodevalue(self):
		return self.FNodeValue

	def set_nodevalue(self, value):
		self.FNodeValue = value

	def __init__(self, parent, text):
		super(MikanTextViewlet, self).__init__(parent)

		self.FNodeValue = text

	# ----------------------------------------------------
	## 処理
	# @return Trueなら続行
	def perform(self):
		# 継承元処理
		if not super(MikanTextViewlet, self).perform():
			return False

		# テキストノード
		node = self.nodevalue
		if (node == None) or (node == ""):
			node = self.defaultnodevalue
		if (node != None):
			text = self.xml.createTextNode(node)
			self.parent.element.appendChild(text)

		return True

	# ----------------------------------------------------
	## Property
	nodevalue = ESiPCProperty(get_nodevalue, set_nodevalue, None)
	defaultnodevalue = ESiPCProperty(get_default_nodevalue, None, None)

class MikanCDataViewlet(MikanViewlet):

	def get_default_nodevalue(self):
		if len(self.performs) > 0:
			return None
		return " "

	def get_nodevalue(self):
		return self.FNodeValue

	def set_nodevalue(self, value):
		self.FNodeValue = value

	def __init__(self, parent, text):
		super(MikanCDataViewlet, self).__init__(parent)

		self.FNodeValue = text

	# ----------------------------------------------------
	## 処理
	# @return Trueなら続行
	def perform(self):
		# 継承元処理
		if not super(MikanCDataViewlet, self).perform():
			return False

		# テキストノード
		node = self.nodevalue
		if (node == None) or (node == ""):
			node = self.defaultnodevalue
		if (node != None):
			text = self.xml.createCDATASection(node)
			self.parent.element.appendChild(text)

		return True

	# ----------------------------------------------------
	## Property
	nodevalue = ESiPCProperty(get_nodevalue, set_nodevalue, None)
	defaultnodevalue = ESiPCProperty(get_default_nodevalue, None, None)

class MikanCommentViewlet(MikanViewlet):

	def get_default_nodevalue(self):
		if len(self.performs) > 0:
			return None
		return " "

	def get_nodevalue(self):
		return self.FNodeValue

	def set_nodevalue(self, value):
		self.FNodeValue = value

	def __init__(self, parent, text):
		super(MikanCommentViewlet, self).__init__(parent)

		self.FNodeValue = text

	# ----------------------------------------------------
	## 処理
	# @return Trueなら続行
	def perform(self):

		# テキストノード
		node = self.nodevalue
		if (node == None) or (node == ""):
			node = self.defaultnodevalue
		if (node != None):
			text = self.xml.createComment(node)
			self.parent.element.appendChild(text)

		return super(MikanCommentViewlet, self).perform()

	# ----------------------------------------------------
	## Property
	nodevalue = ESiPCProperty(get_nodevalue, set_nodevalue, None)
	defaultnodevalue = ESiPCProperty(get_default_nodevalue, None, None)

class MikanElementViewlet(MikanViewlet):

	def get_default_nodevalue(self):
		if len(self.performs) > 0:
			return None
		return " "

	def get_element_name(self):
		return self.FElementName

	def set_element_name(self, value):
		self.FElementName = value

	def set_element_attribute(self, attribute, value):
		if value != None:
			self.element.setAttribute(attribute, unicode(value))

	def set_element_attributes(self):
		for a,v in self.attributevalues.items():
			if v != None:
				self.set_element_attribute(a, v)

	def get_attribute_values(self):
		return self.FAttributeValues

	def set_attribute_value(self, name, value):
		if value != None:
			self.attributevalues[name] = value
		else:
			if name in self.attributevalues:
				del self.attributevalues[name]

	def get_attribute_value(self, name):
		if name in self.attributevalues:
			return self.attributevalues[name]
		return None

	def get_nodevalue(self):
		return self.FNodeValue

	def set_nodevalue(self, value):
		if value == None:
			self.FNodeValue = value
		elif isinstance(value, str):
			self.FNodeValue = value
		elif isinstance(value, unicode):
			self.FNodeValue = value
		else:
			self.logger.warn(self)
			self.logger.warn(value)
			self.logger.warn(traceback.format_exc())


	# ----------------------------------------------------
	## コンストラクタ
	#  @param parent 親Viewlet
	#  @param elementname エレメント名
	def __init__(self, parent, elementname):
		super(MikanElementViewlet, self).__init__(parent)

		self.FAttributeValues = {}
		self.FElementName = elementname
		self.FNodeValue = None

	# ----------------------------------------------------
	## 処理
	# @return Trueなら続行
	def perform(self):
		# エレメント作成
		self.create_element_append(self.elementname)

		# 継承元処理
		if not super(MikanElementViewlet, self).perform():
			return False

		# 属性
		self.set_element_attributes()

		# テキストノード
		node = self.nodevalue
		if (node == None) or (node == ""):
			node = self.defaultnodevalue
		if (node != None):
			text = self.xml.createTextNode(node)
			self.element.appendChild(text)

		return True

	# ----------------------------------------------------
	## Property
	nodevalue = ESiPCProperty(get_nodevalue, set_nodevalue, None)
	elementname = ESiPCProperty(get_element_name, set_element_name, None)
	attributevalues = ESiPCProperty(get_attribute_values, None, None)
	defaultnodevalue = ESiPCProperty(get_default_nodevalue, None, None)




# ------------------------------------------------------------ ------------------------------------------------------------
# ------------------------------------------------------------ ------------------------------------------------------------
# ------------------------------------------------------------ ------------------------------------------------------------




# ------------------------------------------------------------
## HTMLElement
class MikanHTMLElementViewlet(MikanElementViewlet):

	def __init__(self, parent, elementname):
		super(MikanHTMLElementViewlet, self).__init__(parent, elementname)


	def set_accesskey(self, value):
		self.set_attribute_value("accesskey", value)

	def get_accesskey(self):
		return self.get_attribute_value("accesskey")

	def set_class(self, value):
		self.set_attribute_value("class", value)

	def get_class(self):
		return self.get_attribute_value("class")

	def set_role(self, value):
		self.set_attribute_value("role", value)

	def get_role(self):
		return self.get_attribute_value("role")

	def set_contenteditable(self, value):
		self.set_attribute_value("contenteditable", value)

	def get_contenteditable(self):
		return self.get_attribute_value("contenteditable")

	def set_contextmenu(self, value):
		self.set_attribute_value("contextmenu", value)

	def get_contextmenu(self):
		return self.get_attribute_value("contextmenu")

	def set_dir(self, value):
		self.set_attribute_value("dir", value)

	def get_dir(self):
		return self.get_attribute_value("dir")

	def set_draggable(self, value):
		self.set_attribute_value("draggable", value)

	def get_draggable(self):
		return self.get_attribute_value("draggable")

	def set_dropzone(self, value):
		self.set_attribute_value("dropzone", value)

	def get_dropzone(self):
		return self.get_attribute_value("dropzone")

	def set_hidden(self, value):
		self.set_attribute_value("hidden", value)

	def get_hidden(self):
		return self.get_attribute_value("hidden")

	def set_id(self, value):
		self.set_attribute_value("id", value)

	def get_id(self):
		return self.get_attribute_value("id")

	def set_lang(self, value):
		self.set_attribute_value("lang", value)

	def get_lang(self):
		return self.get_attribute_value("lang")

	def set_spellcheck(self, value):
		self.set_attribute_value("spellcheck", value)

	def get_spellcheck(self):
		return self.get_attribute_value("spellcheck")

	def set_style(self, value):
		self.set_attribute_value("style", value)

	def get_style(self):
		return self.get_attribute_value("style")

	def set_tabindex(self, value):
		self.set_attribute_value("tabindex", value)

	def get_tabindex(self):
		return self.get_attribute_value("tabindex")

	def set_title(self, value):
		self.set_attribute_value("title", value)

	def get_title(self):
		return self.get_attribute_value("title")

	def set_onabort(self, value):
		self.set_attribute_value("onabort", value)

	def get_onabort(self):
		return self.get_attribute_value("onabort")

	def set_onblur(self, value):
		self.set_attribute_value("onblur", value)

	def get_onblur(self):
		return self.get_attribute_value("onblur")

	def set_oncanplay(self, value):
		self.set_attribute_value("oncanplay", value)

	def get_oncanplay(self):
		return self.get_attribute_value("oncanplay")

	def set_oncanplaythrough(self, value):
		self.set_attribute_value("oncanplaythrough", value)

	def get_oncanplaythrough(self):
		return self.get_attribute_value("oncanplaythrough")

	def set_onchange(self, value):
		self.set_attribute_value("onchange", value)

	def get_onchange(self):
		return self.get_attribute_value("onchange")

	def set_onclick(self, value):
		self.set_attribute_value("onclick", value)

	def get_onclick(self):
		return self.get_attribute_value("onclick")

	def set_oncontextmenu(self, value):
		self.set_attribute_value("oncontextmenu", value)

	def get_oncontextmenu(self):
		return self.get_attribute_value("oncontextmenu")

	def set_oncuechange(self, value):
		self.set_attribute_value("oncuechange", value)

	def get_oncuechange(self):
		return self.get_attribute_value("oncuechange")

	def set_ondblclick(self, value):
		self.set_attribute_value("ondblclick", value)

	def get_ondblclick(self):
		return self.get_attribute_value("ondblclick")

	def set_ondrag(self, value):
		self.set_attribute_value("ondrag", value)

	def get_ondrag(self):
		return self.get_attribute_value("ondrag")

	def set_ondragend(self, value):
		self.set_attribute_value("ondragend", value)

	def get_ondragend(self):
		return self.get_attribute_value("ondragend")

	def set_ondragenter(self, value):
		self.set_attribute_value("ondragenter", value)

	def get_ondragenter(self):
		return self.get_attribute_value("ondragenter")

	def set_ondragleave(self, value):
		self.set_attribute_value("ondragleave", value)

	def get_ondragleave(self):
		return self.get_attribute_value("ondragleave")

	def set_ondragover(self, value):
		self.set_attribute_value("ondragover", value)

	def get_ondragover(self):
		return self.get_attribute_value("ondragover")

	def set_ondragstart(self, value):
		self.set_attribute_value("ondragstart", value)

	def get_ondragstart(self):
		return self.get_attribute_value("ondragstart")

	def set_ondrop(self, value):
		self.set_attribute_value("ondrop", value)

	def get_ondrop(self):
		return self.get_attribute_value("ondrop")

	def set_ondurationchange(self, value):
		self.set_attribute_value("ondurationchange", value)

	def get_ondurationchange(self):
		return self.get_attribute_value("ondurationchange")

	def set_onemptied(self, value):
		self.set_attribute_value("onemptied", value)

	def get_onemptied(self):
		return self.get_attribute_value("onemptied")

	def set_onended(self, value):
		self.set_attribute_value("onended", value)

	def get_onended(self):
		return self.get_attribute_value("onended")

	def set_onerror(self, value):
		self.set_attribute_value("onerror", value)

	def get_onerror(self):
		return self.get_attribute_value("onerror")

	def set_onfocus(self, value):
		self.set_attribute_value("onfocus", value)

	def get_onfocus(self):
		return self.get_attribute_value("onfocus")

	def set_onformchange(self, value):
		self.set_attribute_value("onformchange", value)

	def get_onformchange(self):
		return self.get_attribute_value("onformchange")

	def set_onforminput(self, value):
		self.set_attribute_value("onforminput", value)

	def get_onforminput(self):
		return self.get_attribute_value("onforminput")

	def set_oninput(self, value):
		self.set_attribute_value("oninput", value)

	def get_oninput(self):
		return self.get_attribute_value("oninput")

	def set_oninvalid(self, value):
		self.set_attribute_value("oninvalid", value)

	def get_oninvalid(self):
		return self.get_attribute_value("oninvalid")

	def set_onkeydown(self, value):
		self.set_attribute_value("onkeydown", value)

	def get_onkeydown(self):
		return self.get_attribute_value("onkeydown")

	def set_onkeypress(self, value):
		self.set_attribute_value("onkeypress", value)

	def get_onkeypress(self):
		return self.get_attribute_value("onkeypress")

	def set_onkeyup(self, value):
		self.set_attribute_value("onkeyup", value)

	def get_onkeyup(self):
		return self.get_attribute_value("onkeyup")

	def set_onload(self, value):
		self.set_attribute_value("onload", value)

	def get_onload(self):
		return self.get_attribute_value("onload")

	def set_onunload(self, value):
		self.set_attribute_value("onunload", value)

	def get_onunload(self):
		return self.get_attribute_value("onunload")

	def set_onloadeddata(self, value):
		self.set_attribute_value("onloadeddata", value)

	def get_onloadeddata(self):
		return self.get_attribute_value("onloadeddata")

	def set_onloadedmetadata(self, value):
		self.set_attribute_value("onloadedmetadata", value)

	def get_onloadedmetadata(self):
		return self.get_attribute_value("onloadedmetadata")

	def set_onloadstart(self, value):
		self.set_attribute_value("onloadstart", value)

	def get_onloadstart(self):
		return self.get_attribute_value("onloadstart")

	def set_onmousedown(self, value):
		self.set_attribute_value("onmousedown", value)

	def get_onmousedown(self):
		return self.get_attribute_value("onmousedown")

	def set_onmousemove(self, value):
		self.set_attribute_value("onmousemove", value)

	def get_onmousemove(self):
		return self.get_attribute_value("onmousemove")

	def set_onmouseout(self, value):
		self.set_attribute_value("onmouseout", value)

	def get_onmouseout(self):
		return self.get_attribute_value("onmouseout")

	def set_onmouseover(self, value):
		self.set_attribute_value("onmouseover", value)

	def get_onmouseover(self):
		return self.get_attribute_value("onmouseover")

	def set_onmouseup(self, value):
		self.set_attribute_value("onmouseup", value)

	def get_onmouseup(self):
		return self.get_attribute_value("onmouseup")

	def set_onmousewheel(self, value):
		self.set_attribute_value("onmousewheel", value)

	def get_onmousewheel(self):
		return self.get_attribute_value("onmousewheel")

	def set_onpause(self, value):
		self.set_attribute_value("onpause", value)

	def get_onpause(self):
		return self.get_attribute_value("onpause")

	def set_onplay(self, value):
		self.set_attribute_value("onplay", value)

	def get_onplay(self):
		return self.get_attribute_value("onplay")

	def set_onplaying(self, value):
		self.set_attribute_value("onplaying", value)

	def get_onplaying(self):
		return self.get_attribute_value("onplaying")

	def set_onprogress(self, value):
		self.set_attribute_value("onprogress", value)

	def get_onprogress(self):
		return self.get_attribute_value("onprogress")

	def set_onratechange(self, value):
		self.set_attribute_value("onratechange", value)

	def get_onratechange(self):
		return self.get_attribute_value("onratechange")

	def set_onreadystatechange(self, value):
		self.set_attribute_value("onreadystatechange", value)

	def get_onreadystatechange(self):
		return self.get_attribute_value("onreadystatechange")

	def set_onresize(self, value):
		self.set_attribute_value("onresize", value)

	def get_onresize(self):
		return self.get_attribute_value("onresize")

	def set_onscroll(self, value):
		self.set_attribute_value("onscroll", value)

	def get_onscroll(self):
		return self.get_attribute_value("onscroll")

	def set_onseeked(self, value):
		self.set_attribute_value("onseeked", value)

	def get_onseeked(self):
		return self.get_attribute_value("onseeked")

	def set_onseeking(self, value):
		self.set_attribute_value("onseeking", value)

	def get_onseeking(self):
		return self.get_attribute_value("onseeking")

	def set_onselect(self, value):
		self.set_attribute_value("onselect", value)

	def get_onselect(self):
		return self.get_attribute_value("onselect")

	def set_onshow(self, value):
		self.set_attribute_value("onshow", value)

	def get_onshow(self):
		return self.get_attribute_value("onshow")

	def set_onstalled(self, value):
		self.set_attribute_value("onstalled", value)

	def get_onstalled(self):
		return self.get_attribute_value("onstalled")

	def set_onsubmit(self, value):
		self.set_attribute_value("onsubmit", value)

	def get_onsubmit(self):
		return self.get_attribute_value("onsubmit")

	def set_onsuspend(self, value):
		self.set_attribute_value("onsuspend", value)

	def get_onsuspend(self):
		return self.get_attribute_value("onsuspend")

	def set_ontimeupdate(self, value):
		self.set_attribute_value("ontimeupdate", value)

	def get_ontimeupdate(self):
		return self.get_attribute_value("ontimeupdate")

	def set_onvolumechange(self, value):
		self.set_attribute_value("onvolumechange", value)

	def get_onvolumechange(self):
		return self.get_attribute_value("onvolumechange")

	def set_onwaiting(self, value):
		self.set_attribute_value("onwaiting", value)

	def get_onwaiting(self):
		return self.get_attribute_value("onwaiting")

	# ----------------------------------------------------
	## Property
	accesskey = ESiPCProperty(get_accesskey, set_accesskey, None)
	clazz = ESiPCProperty(get_class, set_class, None)
	role = ESiPCProperty(get_role, set_role, None)
	contenteditable = ESiPCProperty(get_contenteditable, set_contenteditable, None)
	contextmenu = ESiPCProperty(get_contextmenu, set_contextmenu, None)
	dir = ESiPCProperty(get_dir, set_dir, None)
	draggable = ESiPCProperty(get_draggable, set_draggable, None)
	dropzone = ESiPCProperty(get_dropzone, set_dropzone, None)
	hidden = ESiPCProperty(get_hidden, set_hidden, None)
	id = ESiPCProperty(get_id, set_id, None)
	lang = ESiPCProperty(get_lang, set_lang, None)
	spellcheck = ESiPCProperty(get_spellcheck, set_spellcheck, None)
	style = ESiPCProperty(get_style, set_style, None)
	tabindex = ESiPCProperty(get_tabindex, set_tabindex, None)
	title = ESiPCProperty(get_title, set_title, None)
	onabort = ESiPCProperty(get_onabort, set_onabort, None)
	onblur = ESiPCProperty(get_onblur, set_onblur, None)
	oncanplay = ESiPCProperty(get_oncanplay, set_oncanplay, None)
	oncanplaythrough = ESiPCProperty(get_oncanplaythrough, set_oncanplaythrough, None)
	onchange = ESiPCProperty(get_onchange, set_onchange, None)
	onclick = ESiPCProperty(get_onclick, set_onclick, None)
	oncontextmenu = ESiPCProperty(get_oncontextmenu, set_oncontextmenu, None)
	oncuechange = ESiPCProperty(get_oncuechange, set_oncuechange, None)
	ondblclick = ESiPCProperty(get_ondblclick, set_ondblclick, None)
	ondrag = ESiPCProperty(get_ondrag, set_ondrag, None)
	ondragend = ESiPCProperty(get_ondragend, set_ondragend, None)
	ondragenter = ESiPCProperty(get_ondragenter, set_ondragenter, None)
	ondragleave = ESiPCProperty(get_ondragleave, set_ondragleave, None)
	ondragover = ESiPCProperty(get_ondragover, set_ondragover, None)
	ondragstart = ESiPCProperty(get_ondragstart, set_ondragstart, None)
	ondrop = ESiPCProperty(get_ondrop, set_ondrop, None)
	ondurationchange = ESiPCProperty(get_ondurationchange, set_ondurationchange, None)
	onemptied = ESiPCProperty(get_onemptied, set_onemptied, None)
	onended = ESiPCProperty(get_onended, set_onended, None)
	onerror = ESiPCProperty(get_onerror, set_onerror, None)
	onfocus = ESiPCProperty(get_onfocus, set_onfocus, None)
	onformchange = ESiPCProperty(get_onformchange, set_onformchange, None)
	onforminput = ESiPCProperty(get_onforminput, set_onforminput, None)
	oninput = ESiPCProperty(get_oninput, set_oninput, None)
	oninvalid = ESiPCProperty(get_oninvalid, set_oninvalid, None)
	onkeydown = ESiPCProperty(get_onkeydown, set_onkeydown, None)
	onkeypress = ESiPCProperty(get_onkeypress, set_onkeypress, None)
	onkeyup = ESiPCProperty(get_onkeyup, set_onkeyup, None)
	onload = ESiPCProperty(get_onload, set_onload, None)
	onunload = ESiPCProperty(get_onunload, set_onunload, None)
	onloadeddata = ESiPCProperty(get_onloadeddata, set_onloadeddata, None)
	onloadedmetadata = ESiPCProperty(get_onloadedmetadata, set_onloadedmetadata, None)
	onloadstart = ESiPCProperty(get_onloadstart, set_onloadstart, None)
	onmousedown = ESiPCProperty(get_onmousedown, set_onmousedown, None)
	onmousemove = ESiPCProperty(get_onmousemove, set_onmousemove, None)
	onmouseout = ESiPCProperty(get_onmouseout, set_onmouseout, None)
	onmouseover = ESiPCProperty(get_onmouseover, set_onmouseover, None)
	onmouseup = ESiPCProperty(get_onmouseup, set_onmouseup, None)
	onmousewheel = ESiPCProperty(get_onmousewheel, set_onmousewheel, None)
	onpause = ESiPCProperty(get_onpause, set_onpause, None)
	onplay = ESiPCProperty(get_onplay, set_onplay, None)
	onplaying = ESiPCProperty(get_onplaying, set_onplaying, None)
	onprogress = ESiPCProperty(get_onprogress, set_onprogress, None)
	onratechange = ESiPCProperty(get_onratechange, set_onratechange, None)
	onreadystatechange = ESiPCProperty(get_onreadystatechange, set_onreadystatechange, None)
	onresize = ESiPCProperty(get_onresize, set_onresize, None)
	onscroll = ESiPCProperty(get_onscroll, set_onscroll, None)
	onseeked = ESiPCProperty(get_onseeked, set_onseeked, None)
	onseeking = ESiPCProperty(get_onseeking, set_onseeking, None)
	onselect = ESiPCProperty(get_onselect, set_onselect, None)
	onshow = ESiPCProperty(get_onshow, set_onshow, None)
	onstalled = ESiPCProperty(get_onstalled, set_onstalled, None)
	onsubmit = ESiPCProperty(get_onsubmit, set_onsubmit, None)
	onsuspend = ESiPCProperty(get_onsuspend, set_onsuspend, None)
	ontimeupdate = ESiPCProperty(get_ontimeupdate, set_ontimeupdate, None)
	onvolumechange = ESiPCProperty(get_onvolumechange, set_onvolumechange, None)
	onwaiting = ESiPCProperty(get_onwaiting, set_onwaiting, None)

# ------------------------------------------------------------
## abbr
class MikanAbbrViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, title=None, nodevalue=None, clazz=None):
		super(MikanAbbrViewlet, self).__init__(parent, "abbr")

		if clazz:
			self.clazz = clazz
		self.set_title(title)
		self.nodevalue = nodevalue

	def set_title(self, value):
		self.set_attribute_value("title", value)

	def get_title(self):
		return self.get_attribute_value("title")

	# ----------------------------------------------------
	## Property
	title = ESiPCProperty(get_title, set_title, None)

# ------------------------------------------------------------
## address
class MikanAddressViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanAddressViewlet, self).__init__(parent, "address")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## a
class MikanAViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, href=None, target=None, nodevalue=None, clazz=None):
		super(MikanAViewlet, self).__init__(parent, "a")

		if clazz:
			self.clazz = clazz
		self.set_href(href)
		self.set_target(target)
		self.nodevalue = nodevalue

	def set_href(self, value):
		self.set_attribute_value("href", value)

	def get_href(self):
		return self.get_attribute_value("href")

	def set_target(self, value):
		self.set_attribute_value("target", value)

	def get_target(self):
		return self.get_attribute_value("target")

	def set_rel(self, value):
		self.set_attribute_value("rel", value)

	def get_rel(self):
		return self.get_attribute_value("rel")

	def set_media(self, value):
		self.set_attribute_value("media", value)

	def get_media(self):
		return self.get_attribute_value("media")

	def set_hreflang(self, value):
		self.set_attribute_value("hreflang", value)

	def get_hreflang(self):
		return self.get_attribute_value("hreflang")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	# ----------------------------------------------------
	## Property
	href = ESiPCProperty(get_href, set_href, None)
	target = ESiPCProperty(get_target, set_target, None)
	rel = ESiPCProperty(get_rel, set_rel, None)
	media = ESiPCProperty(get_media, set_media, None)
	hreflang = ESiPCProperty(get_hreflang, set_hreflang, None)
	type = ESiPCProperty(get_type, set_type, None)

# ------------------------------------------------------------
## area
class MikanAreaViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, href=None, alt=None, coords=None, shape=None, target=None, nodevalue=None, clazz=None):
		super(MikanAreaViewlet, self).__init__(parent, "area")

		if clazz:
			self.clazz = clazz
		self.set_href(href)
		self.set_alt(alt)
		self.set_coords(coords)
		self.set_shape(shape)
		self.set_target(target)
		self.nodevalue = nodevalue

	def set_href(self, value):
		self.set_attribute_value("href", value)

	def get_href(self):
		return self.get_attribute_value("href")

	def set_alt(self, value):
		self.set_attribute_value("alt", value)

	def get_alt(self):
		return self.get_attribute_value("alt")

	def set_coords(self, value):
		self.set_attribute_value("coords", value)

	def get_coords(self):
		return self.get_attribute_value("coords")

	def set_shape(self, value):
		self.set_attribute_value("shape", value)

	def get_shape(self):
		return self.get_attribute_value("shape")

	def set_target(self, value):
		self.set_attribute_value("target", value)

	def get_target(self):
		return self.get_attribute_value("target")

	def set_rel(self, value):
		self.set_attribute_value("rel", value)

	def get_rel(self):
		return self.get_attribute_value("rel")

	def set_media(self, value):
		self.set_attribute_value("media", value)

	def get_media(self):
		return self.get_attribute_value("media")

	def set_hreflang(self, value):
		self.set_attribute_value("hreflang", value)

	def get_hreflang(self):
		return self.get_attribute_value("hreflang")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	# ----------------------------------------------------
	## Property
	href = ESiPCProperty(get_href, set_href, None)
	alt = ESiPCProperty(get_alt, set_alt, None)
	coords = ESiPCProperty(get_coords, set_coords, None)
	shape = ESiPCProperty(get_shape, set_shape, None)
	target = ESiPCProperty(get_target, set_target, None)
	rel = ESiPCProperty(get_rel, set_rel, None)
	media = ESiPCProperty(get_media, set_media, None)
	hreflang = ESiPCProperty(get_hreflang, set_hreflang, None)
	type = ESiPCProperty(get_type, set_type, None)

# ------------------------------------------------------------
## article
class MikanArticleViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanArticleViewlet, self).__init__(parent, "article")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## aside
class MikanAsideViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanAsideViewlet, self).__init__(parent, "aside")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## audio
class MikanAudioViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, src=None, autoplay=None, loop=None, clazz=None):
		super(MikanAudioViewlet, self).__init__(parent, "audio")

		if clazz:
			self.clazz = clazz
		self.set_src(src)
		self.set_autoplay(autoplay)
		self.set_loop(loop)

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_autoplay(self, value):
		self.set_attribute_value("autoplay", value)

	def get_autoplay(self):
		return self.get_attribute_value("autoplay")

	def set_loop(self, value):
		self.set_attribute_value("loop", value)

	def get_loop(self):
		return self.get_attribute_value("loop")

	def set_crossorigin(self, value):
		self.set_attribute_value("crossorigin", value)

	def get_crossorigin(self):
		return self.get_attribute_value("crossorigin")

	def set_preload(self, value):
		self.set_attribute_value("preload", value)

	def get_preload(self):
		return self.get_attribute_value("preload")

	def set_mediagroup(self, value):
		self.set_attribute_value("mediagroup", value)

	def get_mediagroup(self):
		return self.get_attribute_value("mediagroup")

	def set_muted(self, value):
		self.set_attribute_value("muted", value)

	def get_muted(self):
		return self.get_attribute_value("muted")

	def set_controls(self, value):
		self.set_attribute_value("controls", value)

	def get_controls(self):
		return self.get_attribute_value("controls")

	# ----------------------------------------------------
	## Property
	src = ESiPCProperty(get_src, set_src, None)
	autoplay = ESiPCProperty(get_autoplay, set_autoplay, None)
	loop = ESiPCProperty(get_loop, set_loop, None)
	crossorigin = ESiPCProperty(get_crossorigin, set_crossorigin, None)
	preload = ESiPCProperty(get_preload, set_preload, None)
	mediagroup = ESiPCProperty(get_mediagroup, set_mediagroup, None)
	muted = ESiPCProperty(get_muted, set_muted, None)
	controls = ESiPCProperty(get_controls, set_controls, None)

# ------------------------------------------------------------
## b
class MikanBViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanBViewlet, self).__init__(parent, "b")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## base
class MikanBaseViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, href=None, target=None, nodevalue=None, clazz=None):
		super(MikanBaseViewlet, self).__init__(parent, "base")

		if clazz:
			self.clazz = clazz
		self.set_href(href)
		self.set_target(target)
		self.nodevalue = nodevalue

	def set_href(self, value):
		self.set_attribute_value("href", value)

	def get_href(self):
		return self.get_attribute_value("href")

	def set_target(self, value):
		self.set_attribute_value("target", value)

	def get_target(self):
		return self.get_attribute_value("target")

	# ----------------------------------------------------
	## Property
	href = ESiPCProperty(get_href, set_href, None)
	target = ESiPCProperty(get_target, set_target, None)

# ------------------------------------------------------------
## bdi
class MikanBdiViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanBdiViewlet, self).__init__(parent, "bdi")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## bdo
class MikanBdoViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanBdoViewlet, self).__init__(parent, "bdo")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## blockquote
class MikanBlockquoteViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanBlockquoteViewlet, self).__init__(parent, "blockquote")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	def set_cite(self, value):
		self.set_attribute_value("cite", value)

	def get_cite(self):
		return self.get_attribute_value("cite")

	# ----------------------------------------------------
	## Property
	cite = ESiPCProperty(get_cite, set_cite, None)

# ------------------------------------------------------------
## body
class MikanBodyViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanBodyViewlet, self).__init__(parent, "body")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	def set_onafterprint(self, value):
		self.set_attribute_value("onafterprint", value)

	def get_onafterprint(self):
		return self.get_attribute_value("onafterprint")

	def set_onbeforeprint(self, value):
		self.set_attribute_value("onbeforeprint", value)

	def get_onbeforeprint(self):
		return self.get_attribute_value("onbeforeprint")

	def set_onbeforeunload(self, value):
		self.set_attribute_value("onbeforeunload", value)

	def get_onbeforeunload(self):
		return self.get_attribute_value("onbeforeunload")

	def set_onhashchange(self, value):
		self.set_attribute_value("onhashchange", value)

	def get_onhashchange(self):
		return self.get_attribute_value("onhashchange")

	def set_onmessage(self, value):
		self.set_attribute_value("onmessage", value)

	def get_onmessage(self):
		return self.get_attribute_value("onmessage")

	def set_onoffline(self, value):
		self.set_attribute_value("onoffline", value)

	def get_onoffline(self):
		return self.get_attribute_value("onoffline")

	def set_ononline(self, value):
		self.set_attribute_value("ononline", value)

	def get_ononline(self):
		return self.get_attribute_value("ononline")

	def set_onpagehide(self, value):
		self.set_attribute_value("onpagehide", value)

	def get_onpagehide(self):
		return self.get_attribute_value("onpagehide")

	def set_onpageshow(self, value):
		self.set_attribute_value("onpageshow", value)

	def get_onpageshow(self):
		return self.get_attribute_value("onpageshow")

	def set_onpopstate(self, value):
		self.set_attribute_value("onpopstate", value)

	def get_onpopstate(self):
		return self.get_attribute_value("onpopstate")

	def set_onstorage(self, value):
		self.set_attribute_value("onstorage", value)

	def get_onstorage(self):
		return self.get_attribute_value("onstorage")

	# ----------------------------------------------------
	## Property
	onafterprint = ESiPCProperty(get_onafterprint, set_onafterprint, None)
	onbeforeprint = ESiPCProperty(get_onbeforeprint, set_onbeforeprint, None)
	onbeforeunload = ESiPCProperty(get_onbeforeunload, set_onbeforeunload, None)
	onhashchange = ESiPCProperty(get_onhashchange, set_onhashchange, None)
	onmessage = ESiPCProperty(get_onmessage, set_onmessage, None)
	onoffline = ESiPCProperty(get_onoffline, set_onoffline, None)
	ononline = ESiPCProperty(get_ononline, set_ononline, None)
	onpagehide = ESiPCProperty(get_onpagehide, set_onpagehide, None)
	onpageshow = ESiPCProperty(get_onpageshow, set_onpageshow, None)
	onpopstate = ESiPCProperty(get_onpopstate, set_onpopstate, None)
	onstorage = ESiPCProperty(get_onstorage, set_onstorage, None)

# ------------------------------------------------------------
## br
class MikanBrViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanBrViewlet, self).__init__(parent, "br")

		if clazz:
			self.clazz = clazz

	def get_default_nodevalue(self):
		return None

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## button
class MikanButtonViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanButtonViewlet, self).__init__(parent, "button")

		if clazz:
			self.clazz = clazz

	def set_autofocus(self, value):
		self.set_attribute_value("autofocus", value)

	def get_autofocus(self):
		return self.get_attribute_value("autofocus")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_formaction(self, value):
		self.set_attribute_value("formaction", value)

	def get_formaction(self):
		return self.get_attribute_value("formaction")

	def set_formenctype(self, value):
		self.set_attribute_value("formenctype", value)

	def get_formenctype(self):
		return self.get_attribute_value("formenctype")

	def set_formmethod(self, value):
		self.set_attribute_value("formmethod", value)

	def get_formmethod(self):
		return self.get_attribute_value("formmethod")

	def set_formnovalidate(self, value):
		self.set_attribute_value("formnovalidate", value)

	def get_formnovalidate(self):
		return self.get_attribute_value("formnovalidate")

	def set_formtarget(self, value):
		self.set_attribute_value("formtarget", value)

	def get_formtarget(self):
		return self.get_attribute_value("formtarget")

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_value(self, value):
		self.set_attribute_value("value", value)

	def get_value(self):
		return self.get_attribute_value("value")

	# ----------------------------------------------------
	## Property
	autofocus = ESiPCProperty(get_autofocus, set_autofocus, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)
	form = ESiPCProperty(get_form, set_form, None)
	formaction = ESiPCProperty(get_formaction, set_formaction, None)
	formenctype = ESiPCProperty(get_formenctype, set_formenctype, None)
	formmethod = ESiPCProperty(get_formmethod, set_formmethod, None)
	formnovalidate = ESiPCProperty(get_formnovalidate, set_formnovalidate, None)
	formtarget = ESiPCProperty(get_formtarget, set_formtarget, None)
	name = ESiPCProperty(get_name, set_name, None)
	type = ESiPCProperty(get_type, set_type, None)
	value = ESiPCProperty(get_value, set_value, None)

# ------------------------------------------------------------
## canvas
class MikanCanvasViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, width=None, height=None, clazz=None):
		super(MikanCanvasViewlet, self).__init__(parent, "canvas")

		if clazz:
			self.clazz = clazz
		self.set_width(width)
		self.set_height(height)

	def set_width(self, value):
		self.set_attribute_value("width", value)

	def get_width(self):
		return self.get_attribute_value("width")

	def set_height(self, value):
		self.set_attribute_value("height", value)

	def get_height(self):
		return self.get_attribute_value("height")

	# ----------------------------------------------------
	## Property
	width = ESiPCProperty(get_width, set_width, None)
	height = ESiPCProperty(get_height, set_height, None)

# ------------------------------------------------------------
## caption
class MikanCaptionViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanCaptionViewlet, self).__init__(parent, "caption")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## cite
class MikanCiteViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanCiteViewlet, self).__init__(parent, "cite")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## code
class MikanCodeViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanCodeViewlet, self).__init__(parent, "code")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## colgroup
class MikanColgroupViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanColgroupViewlet, self).__init__(parent, "colgroup")

		if clazz:
			self.clazz = clazz

	def set_span(self, value):
		self.set_attribute_value("span", value)

	def get_span(self):
		return self.get_attribute_value("span")

	# ----------------------------------------------------
	## Property
	span = ESiPCProperty(get_span, set_span, None)

# ------------------------------------------------------------
## col
class MikanColViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanColViewlet, self).__init__(parent, "col")

		if clazz:
			self.clazz = clazz

	def set_span(self, value):
		self.set_attribute_value("span", value)

	def get_span(self):
		return self.get_attribute_value("span")

	# ----------------------------------------------------
	## Property
	span = ESiPCProperty(get_span, set_span, None)

# ------------------------------------------------------------
## command
class MikanCommandViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanCommandViewlet, self).__init__(parent, "command")

		if clazz:
			self.clazz = clazz

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_label(self, value):
		self.set_attribute_value("label", value)

	def get_label(self):
		return self.get_attribute_value("label")

	def set_icon(self, value):
		self.set_attribute_value("icon", value)

	def get_icon(self):
		return self.get_attribute_value("icon")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	def set_checked(self, value):
		self.set_attribute_value("checked", value)

	def get_checked(self):
		return self.get_attribute_value("checked")

	def set_radiogroup(self, value):
		self.set_attribute_value("radiogroup", value)

	def get_radiogroup(self):
		return self.get_attribute_value("radiogroup")

	def set_command(self, value):
		self.set_attribute_value("command", value)

	def get_command(self):
		return self.get_attribute_value("command")

	# ----------------------------------------------------
	## Property
	type = ESiPCProperty(get_type, set_type, None)
	label = ESiPCProperty(get_label, set_label, None)
	icon = ESiPCProperty(get_icon, set_icon, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)
	checked = ESiPCProperty(get_checked, set_checked, None)
	radiogroup = ESiPCProperty(get_radiogroup, set_radiogroup, None)
	command = ESiPCProperty(get_command, set_command, None)

# ------------------------------------------------------------
## datalist
class MikanDatalistViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanDatalistViewlet, self).__init__(parent, "datalist")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## dd
class MikanDdViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanDdViewlet, self).__init__(parent, "dd")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## del
class MikanDelViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanDelViewlet, self).__init__(parent, "del")

		if clazz:
			self.clazz = clazz

	def set_cite(self, value):
		self.set_attribute_value("cite", value)

	def get_cite(self):
		return self.get_attribute_value("cite")

	def set_datetime(self, value):
		self.set_attribute_value("datetime", value)

	def get_datetime(self):
		return self.get_attribute_value("datetime")

	# ----------------------------------------------------
	## Property
	cite = ESiPCProperty(get_cite, set_cite, None)
	datetime = ESiPCProperty(get_datetime, set_datetime, None)

# ------------------------------------------------------------
## details
class MikanDetailsViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanDetailsViewlet, self).__init__(parent, "details")

		if clazz:
			self.clazz = clazz

	def set_open(self, value):
		self.set_attribute_value("open", value)

	def get_open(self):
		return self.get_attribute_value("open")

	# ----------------------------------------------------
	## Property
	open = ESiPCProperty(get_open, set_open, None)

# ------------------------------------------------------------
## dfn
class MikanDfnViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanDfnViewlet, self).__init__(parent, "dfn")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## dialog
class MikanDialogViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanDialogViewlet, self).__init__(parent, "dialog")

		if clazz:
			self.clazz = clazz

	def set_open(self, value):
		self.set_attribute_value("open", value)

	def get_open(self):
		return self.get_attribute_value("open")

	# ----------------------------------------------------
	## Property
	open = ESiPCProperty(get_open, set_open, None)

# ------------------------------------------------------------
## div
class MikanDivViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanDivViewlet, self).__init__(parent, "div")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## dl
class MikanDlViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanDlViewlet, self).__init__(parent, "dl")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## dt
class MikanDtViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanDtViewlet, self).__init__(parent, "dt")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## embed
class MikanEmbedViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, src=None, type=None, clazz=None):
		super(MikanEmbedViewlet, self).__init__(parent, "embed")

		if clazz:
			self.clazz = clazz
		self.set_src(src)
		self.set_type(type)

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_width(self, value):
		self.set_attribute_value("width", value)

	def get_width(self):
		return self.get_attribute_value("width")

	def set_height(self, value):
		self.set_attribute_value("height", value)

	def get_height(self):
		return self.get_attribute_value("height")

	# ----------------------------------------------------
	## Property
	src = ESiPCProperty(get_src, set_src, None)
	type = ESiPCProperty(get_type, set_type, None)
	width = ESiPCProperty(get_width, set_width, None)
	height = ESiPCProperty(get_height, set_height, None)

# ------------------------------------------------------------
## em
class MikanEmViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanEmViewlet, self).__init__(parent, "em")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## fieldset
class MikanFieldsetViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, form=None, name=None, clazz=None):
		super(MikanFieldsetViewlet, self).__init__(parent, "fieldset")

		if clazz:
			self.clazz = clazz
		self.set_form(form)
		self.set_name(name)

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	# ----------------------------------------------------
	## Property
	form = ESiPCProperty(get_form, set_form, None)
	name = ESiPCProperty(get_name, set_name, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)

# ------------------------------------------------------------
## figcaption
class MikanFigcaptionViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanFigcaptionViewlet, self).__init__(parent, "figcaption")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## figure
class MikanFigureViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanFigureViewlet, self).__init__(parent, "figure")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## footer
class MikanFooterViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanFooterViewlet, self).__init__(parent, "footer")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## h1
class MikanH1Viewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanH1Viewlet, self).__init__(parent, "h1")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## h2
class MikanH2Viewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanH2Viewlet, self).__init__(parent, "h2")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## h3
class MikanH3Viewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanH3Viewlet, self).__init__(parent, "h3")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## h4
class MikanH4Viewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanH4Viewlet, self).__init__(parent, "h4")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## h5
class MikanH5Viewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanH5Viewlet, self).__init__(parent, "h5")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## h6
class MikanH6Viewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanH6Viewlet, self).__init__(parent, "h6")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## header
class MikanHeaderViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanHeaderViewlet, self).__init__(parent, "header")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## form
class MikanFormViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, action=None, target=None, method="POST", name=None, enctype="multipart/form-data", clazz=None):
		super(MikanFormViewlet, self).__init__(parent, "form")

		if clazz:
			self.clazz = clazz
		self.set_action(action)
		self.set_target(target)
		self.set_method(method)
		self.set_name(name)
		self.set_enctype(enctype)

	def set_action(self, value):
		self.set_attribute_value("action", value)

	def get_action(self):
		return self.get_attribute_value("action")

	def set_target(self, value):
		self.set_attribute_value("target", value)

	def get_target(self):
		return self.get_attribute_value("target")

	def set_method(self, value):
		self.set_attribute_value("method", value)

	def get_method(self):
		return self.get_attribute_value("method")

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_autocomplete(self, value):
		self.set_attribute_value("autocomplete", value)

	def get_autocomplete(self):
		return self.get_attribute_value("autocomplete")

	def set_acceptcharset(self, value):
		self.set_attribute_value("accept-charset", value)

	def get_acceptcharset(self):
		return self.get_attribute_value("accept-charset")

	def set_enctype(self, value):
		self.set_attribute_value("enctype", value)

	def get_enctype(self):
		return self.get_attribute_value("enctype")

	def set_novalidate(self, value):
		self.set_attribute_value("novalidate", value)

	def get_novalidate(self):
		return self.get_attribute_value("novalidate")

	# ----------------------------------------------------
	## Property
	action = ESiPCProperty(get_action, set_action, None)
	target = ESiPCProperty(get_target, set_target, None)
	method = ESiPCProperty(get_method, set_method, None)
	name = ESiPCProperty(get_name, set_name, None)
	autocomplete = ESiPCProperty(get_autocomplete, set_autocomplete, None)
	acceptcharset = ESiPCProperty(get_acceptcharset, set_acceptcharset, None)
	enctype = ESiPCProperty(get_enctype, set_enctype, None)
	novalidate = ESiPCProperty(get_novalidate, set_novalidate, None)

# ------------------------------------------------------------
## head
class MikanHeadViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanHeadViewlet, self).__init__(parent, "head")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## hgroup
class MikanHgroupViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanHgroupViewlet, self).__init__(parent, "hgroup")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## hr
class MikanHrViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanHrViewlet, self).__init__(parent, "hr")

		if clazz:
			self.clazz = clazz

	def get_default_nodevalue(self):
		return None

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## i
class MikanIViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanIViewlet, self).__init__(parent, "i")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## iframe
class MikanIframeViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanIframeViewlet, self).__init__(parent, "iframe")

		if clazz:
			self.clazz = clazz

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_srcdoc(self, value):
		self.set_attribute_value("srcdoc", value)

	def get_srcdoc(self):
		return self.get_attribute_value("srcdoc")

	def set_width(self, value):
		self.set_attribute_value("width", value)

	def get_width(self):
		return self.get_attribute_value("width")

	def set_height(self, value):
		self.set_attribute_value("height", value)

	def get_height(self):
		return self.get_attribute_value("height")

	def set_sandbox(self, value):
		self.set_attribute_value("sandbox", value)

	def get_sandbox(self):
		return self.get_attribute_value("sandbox")

	def set_seamless(self, value):
		self.set_attribute_value("seamless", value)

	def get_seamless(self):
		return self.get_attribute_value("seamless")

	# ----------------------------------------------------
	## Property
	name = ESiPCProperty(get_name, set_name, None)
	src = ESiPCProperty(get_src, set_src, None)
	srcdoc = ESiPCProperty(get_srcdoc, set_srcdoc, None)
	width = ESiPCProperty(get_width, set_width, None)
	height = ESiPCProperty(get_height, set_height, None)
	sandbox = ESiPCProperty(get_sandbox, set_sandbox, None)
	seamless = ESiPCProperty(get_seamless, set_seamless, None)

# ------------------------------------------------------------
## img
class MikanImgViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, src=None, alt=None, clazz=None):
		super(MikanImgViewlet, self).__init__(parent, "img")

		if clazz:
			self.clazz = clazz
		self.set_alt(alt)
		self.set_src(src)

	def get_default_nodevalue(self):
		return None

	def set_alt(self, value):
		self.set_attribute_value("alt", value)

	def get_alt(self):
		return self.get_attribute_value("alt")

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_width(self, value):
		self.set_attribute_value("width", value)

	def get_width(self):
		return self.get_attribute_value("width")

	def set_height(self, value):
		self.set_attribute_value("height", value)

	def get_height(self):
		return self.get_attribute_value("height")

	def set_usemap(self, value):
		self.set_attribute_value("usemap", value)

	def get_usemap(self):
		return self.get_attribute_value("usemap")

	def set_ismap(self, value):
		self.set_attribute_value("ismap", value)

	def get_ismap(self):
		return self.get_attribute_value("ismap")

	# ----------------------------------------------------
	## Property
	alt = ESiPCProperty(get_alt, set_alt, None)
	src = ESiPCProperty(get_src, set_src, None)
	width = ESiPCProperty(get_width, set_width, None)
	height = ESiPCProperty(get_height, set_height, None)
	usemap = ESiPCProperty(get_usemap, set_usemap, None)
	ismap = ESiPCProperty(get_ismap, set_ismap, None)

# ------------------------------------------------------------
## ins
class MikanInsViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanInsViewlet, self).__init__(parent, "ins")

		if clazz:
			self.clazz = clazz

	def set_cite(self, value):
		self.set_attribute_value("cite", value)

	def get_cite(self):
		return self.get_attribute_value("cite")

	def set_datetime(self, value):
		self.set_attribute_value("datetime", value)

	def get_datetime(self):
		return self.get_attribute_value("datetime")

	# ----------------------------------------------------
	## Property
	cite = ESiPCProperty(get_cite, set_cite, None)
	datetime = ESiPCProperty(get_datetime, set_datetime, None)

# ------------------------------------------------------------
## kdb
class MikanKdbViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanKdbViewlet, self).__init__(parent, "kdb")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## keygen
class MikanKeygenViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, name=None, form=None, clazz=None):
		super(MikanKeygenViewlet, self).__init__(parent, "keygen")

		if clazz:
			self.clazz = clazz
		self.set_name(name)
		self.set_form(form)

	def get_default_nodevalue(self):
		return None

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_autofocus(self, value):
		self.set_attribute_value("autofocus", value)

	def get_autofocus(self):
		return self.get_attribute_value("autofocus")

	def set_challenge(self, value):
		self.set_attribute_value("challenge", value)

	def get_challenge(self):
		return self.get_attribute_value("challenge")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	def set_keytype(self, value):
		self.set_attribute_value("keytype", value)

	def get_keytype(self):
		return self.get_attribute_value("keytype")

	# ----------------------------------------------------
	## Property
	name = ESiPCProperty(get_name, set_name, None)
	form = ESiPCProperty(get_form, set_form, None)
	autofocus = ESiPCProperty(get_autofocus, set_autofocus, None)
	challenge = ESiPCProperty(get_challenge, set_challenge, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)
	keytype = ESiPCProperty(get_keytype, set_keytype, None)

# ------------------------------------------------------------
## label
class MikanLabelViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanLabelViewlet, self).__init__(parent, "label")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_for(self, value):
		self.set_attribute_value("for", value)

	def get_for(self):
		return self.get_attribute_value("for")

	# ----------------------------------------------------
	## Property
	form = ESiPCProperty(get_form, set_form, None)
	f0r = ESiPCProperty(get_for, set_for, None)

# ------------------------------------------------------------
## legend
class MikanLegendViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanLegendViewlet, self).__init__(parent, "legend")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## li
class MikanLiViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanLiViewlet, self).__init__(parent, "li")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## link
class MikanLinkViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, rel=None, href=None, type=None, clazz=None):
		super(MikanLinkViewlet, self).__init__(parent, "link")

		if clazz:
			self.clazz = clazz
		self.set_rel(rel)
		self.set_href(href)
		self.set_type(type)

	def get_default_nodevalue(self):
		return None

	def set_rel(self, value):
		self.set_attribute_value("rel", value)

	def get_rel(self):
		return self.get_attribute_value("rel")

	def set_href(self, value):
		self.set_attribute_value("href", value)

	def get_href(self):
		return self.get_attribute_value("href")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_media(self, value):
		self.set_attribute_value("media", value)

	def get_media(self):
		return self.get_attribute_value("media")

	def set_hreflang(self, value):
		self.set_attribute_value("hreflang", value)

	def get_hreflang(self):
		return self.get_attribute_value("hreflang")

	def set_sizes(self, value):
		self.set_attribute_value("sizes", value)

	def get_sizes(self):
		return self.get_attribute_value("sizes")

	# ----------------------------------------------------
	## Property
	rel = ESiPCProperty(get_rel, set_rel, None)
	href = ESiPCProperty(get_href, set_href, None)
	type = ESiPCProperty(get_type, set_type, None)
	media = ESiPCProperty(get_media, set_media, None)
	hreflang = ESiPCProperty(get_hreflang, set_hreflang, None)
	sizes = ESiPCProperty(get_sizes, set_sizes, None)

# ------------------------------------------------------------
## main
class MikanMainViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanMainViewlet, self).__init__(parent, "main")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## math
class MikanMathViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanMathViewlet, self).__init__(parent, "math")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## map
class MikanMapViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanMapViewlet, self).__init__(parent, "map")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## mark
class MikanMarkViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanMarkViewlet, self).__init__(parent, "mark")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## menu
class MikanMenuViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanMenuViewlet, self).__init__(parent, "menu")

		if clazz:
			self.clazz = clazz

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_label(self, value):
		self.set_attribute_value("label", value)

	def get_label(self):
		return self.get_attribute_value("label")

	# ----------------------------------------------------
	## Property
	type = ESiPCProperty(get_type, set_type, None)
	label = ESiPCProperty(get_label, set_label, None)

# ------------------------------------------------------------
## meta
class MikanMetaViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, name=None, content=None, httpequiv=None, clazz=None):
		super(MikanMetaViewlet, self).__init__(parent, "meta")

		if clazz:
			self.clazz = clazz
		self.set_name(name)
		self.set_content(content)
		self.set_httpequiv(httpequiv)

	def get_default_nodevalue(self):
		return None

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_content(self, value):
		self.set_attribute_value("content", value)

	def get_content(self):
		return self.get_attribute_value("content")

	def set_httpequiv(self, value):
		self.set_attribute_value("http-equiv", value)

	def get_httpequiv(self):
		return self.get_attribute_value("http-equiv")

	def set_charset(self, value):
		self.set_attribute_value("charset", value)

	def get_charset(self):
		return self.get_attribute_value("charset")

	# ----------------------------------------------------
	## Property
	name = ESiPCProperty(get_name, set_name, None)
	content = ESiPCProperty(get_content, set_content, None)
	httpequiv = ESiPCProperty(get_httpequiv, set_httpequiv, None)
	charset = ESiPCProperty(get_charset, set_charset, None)

# ------------------------------------------------------------
## meter
class MikanMeterViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanMeterViewlet, self).__init__(parent, "meter")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	def set_value(self, value):
		self.set_attribute_value("value", value)

	def get_value(self):
		return self.get_attribute_value("value")

	def set_min(self, value):
		self.set_attribute_value("min", value)

	def get_min(self):
		return self.get_attribute_value("min")

	def set_max(self, value):
		self.set_attribute_value("max", value)

	def get_max(self):
		return self.get_attribute_value("max")

	def set_low(self, value):
		self.set_attribute_value("low", value)

	def get_low(self):
		return self.get_attribute_value("low")

	def set_high(self, value):
		self.set_attribute_value("high", value)

	def get_high(self):
		return self.get_attribute_value("high")

	def set_optimum(self, value):
		self.set_attribute_value("optimum", value)

	def get_optimum(self):
		return self.get_attribute_value("optimum")

	# ----------------------------------------------------
	## Property
	value = ESiPCProperty(get_value, set_value, None)
	min = ESiPCProperty(get_min, set_min, None)
	max = ESiPCProperty(get_max, set_max, None)
	low = ESiPCProperty(get_low, set_low, None)
	high = ESiPCProperty(get_high, set_high, None)
	optimum = ESiPCProperty(get_optimum, set_optimum, None)

# ------------------------------------------------------------
## nav
class MikanNavViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanNavViewlet, self).__init__(parent, "nav")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## noscript
class MikanNoscriptViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanNoscriptViewlet, self).__init__(parent, "noscript")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## object
class MikanObjectViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanObjectViewlet, self).__init__(parent, "object")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	def set_data(self, value):
		self.set_attribute_value("data", value)

	def get_data(self):
		return self.get_attribute_value("data")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_typemustmatch(self, value):
		self.set_attribute_value("typemustmatch", value)

	def get_typemustmatch(self):
		return self.get_attribute_value("typemustmatch")

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_usemap(self, value):
		self.set_attribute_value("usemap", value)

	def get_usemap(self):
		return self.get_attribute_value("usemap")

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_width(self, value):
		self.set_attribute_value("width", value)

	def get_width(self):
		return self.get_attribute_value("width")

	def set_height(self, value):
		self.set_attribute_value("height", value)

	def get_height(self):
		return self.get_attribute_value("height")

	# ----------------------------------------------------
	## Property
	data = ESiPCProperty(get_data, set_data, None)
	type = ESiPCProperty(get_type, set_type, None)
	typemustmatch = ESiPCProperty(get_typemustmatch, set_typemustmatch, None)
	name = ESiPCProperty(get_name, set_name, None)
	usemap = ESiPCProperty(get_usemap, set_usemap, None)
	form = ESiPCProperty(get_form, set_form, None)
	width = ESiPCProperty(get_width, set_width, None)
	height = ESiPCProperty(get_height, set_height, None)

# ------------------------------------------------------------
## ol
class MikanOlViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanOlViewlet, self).__init__(parent, "ol")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	def set_reversed(self, value):
		self.set_attribute_value("reversed", value)

	def get_reversed(self):
		return self.get_attribute_value("reversed")

	def set_start(self, value):
		self.set_attribute_value("start", value)

	def get_start(self):
		return self.get_attribute_value("start")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	# ----------------------------------------------------
	## Property
	reversed = ESiPCProperty(get_reversed, set_reversed, None)
	start = ESiPCProperty(get_start, set_start, None)
	type = ESiPCProperty(get_type, set_type, None)

# ------------------------------------------------------------
## optgroup
class MikanOptgroupViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, label=None, clazz=None):
		super(MikanOptgroupViewlet, self).__init__(parent, "optgroup")

		if clazz:
			self.clazz = clazz
		self.set_label(label)

	def set_label(self, value):
		self.set_attribute_value("label", value)

	def get_label(self):
		return self.get_attribute_value("label")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	# ----------------------------------------------------
	## Property
	label = ESiPCProperty(get_label, set_label, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)

# ------------------------------------------------------------
## option
class MikanOptionViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, value=None, label=None, selected=None, nodevalue=None, clazz=None):
		super(MikanOptionViewlet, self).__init__(parent, "option")

		if clazz:
			self.clazz = clazz
		self.set_value(value)
		self.set_label(label)
		self.set_selected(selected)
		self.nodevalue = nodevalue

	def set_value(self, value):
		self.set_attribute_value("value", value)

	def get_value(self):
		return self.get_attribute_value("value")

	def set_label(self, value):
		self.set_attribute_value("label", value)

	def get_label(self):
		return self.get_attribute_value("label")

	def set_selected(self, value):
		self.set_attribute_value("selected", value)

	def get_selected(self):
		return self.get_attribute_value("selected")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	# ----------------------------------------------------
	## Property
	value = ESiPCProperty(get_value, set_value, None)
	label = ESiPCProperty(get_label, set_label, None)
	selected = ESiPCProperty(get_selected, set_selected, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)

# ------------------------------------------------------------
## output
class MikanOutputViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, name=None, nodevalue=None, clazz=None):
		super(MikanOutputViewlet, self).__init__(parent, "output")

		if clazz:
			self.clazz = clazz
		self.set_name(name)
		self.nodevalue = nodevalue

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_for(self, value):
		self.set_attribute_value("for", value)

	def get_for(self):
		return self.get_attribute_value("for")

	# ----------------------------------------------------
	## Property
	name = ESiPCProperty(get_name, set_name, None)
	form = ESiPCProperty(get_form, set_form, None)
	f0r = ESiPCProperty(get_for, set_for, None)

# ------------------------------------------------------------
## p
class MikanPViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanPViewlet, self).__init__(parent, "p")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## param
class MikanParamViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, name=None, value=None, clazz=None):
		super(MikanParamViewlet, self).__init__(parent, "param")

		if clazz:
			self.clazz = clazz
		self.set_name(name)
		self.set_value(value)

	def get_default_nodevalue(self):
		return None

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_value(self, value):
		self.set_attribute_value("value", value)

	def get_value(self):
		return self.get_attribute_value("value")

	# ----------------------------------------------------
	## Property
	name = ESiPCProperty(get_name, set_name, None)
	value = ESiPCProperty(get_value, set_value, None)

# ------------------------------------------------------------
## pre
class MikanPreViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanPreViewlet, self).__init__(parent, "pre")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## progress
class MikanProgressViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, value=None, clazz=None):
		super(MikanProgressViewlet, self).__init__(parent, "progress")

		if clazz:
			self.clazz = clazz
		self.set_value(value)

	def set_value(self, value):
		self.set_attribute_value("value", value)

	def get_value(self):
		return self.get_attribute_value("value")

	def set_max(self, value):
		self.set_attribute_value("max", value)

	def get_max(self):
		return self.get_attribute_value("max")

	# ----------------------------------------------------
	## Property
	value = ESiPCProperty(get_value, set_value, None)
	max = ESiPCProperty(get_max, set_max, None)

# ------------------------------------------------------------
## q
class MikanQViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanQViewlet, self).__init__(parent, "q")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	def set_cite(self, value):
		self.set_attribute_value("cite", value)

	def get_cite(self):
		return self.get_attribute_value("cite")

	# ----------------------------------------------------
	## Property
	cite = ESiPCProperty(get_cite, set_cite, None)

# ------------------------------------------------------------
## rp
class MikanRpViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanRpViewlet, self).__init__(parent, "rp")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## rt
class MikanRtViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanRtViewlet, self).__init__(parent, "rt")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## ruby
class MikanRubyViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanRubyViewlet, self).__init__(parent, "ruby")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## s
class MikanSViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanSViewlet, self).__init__(parent, "s")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## samp
class MikanSampViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanSampViewlet, self).__init__(parent, "samp")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## script
class MikanScriptViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, src=None, charset=None, type=None, nodevalue=None, clazz=None):
		super(MikanScriptViewlet, self).__init__(parent, "script")

		if clazz:
			self.clazz = clazz
		self.set_src(src)
		self.set_charset(charset)
		self.set_type(type)
		self.nodevalue = nodevalue

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_charset(self, value):
		self.set_attribute_value("charset", value)

	def get_charset(self):
		return self.get_attribute_value("charset")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_async(self, value):
		self.set_attribute_value("async", value)

	def get_async(self):
		return self.get_attribute_value("async")

	def set_defer(self, value):
		self.set_attribute_value("defer", value)

	def get_defer(self):
		return self.get_attribute_value("defer")

	# ----------------------------------------------------
	## Property
	src = ESiPCProperty(get_src, set_src, None)
	charset = ESiPCProperty(get_charset, set_charset, None)
	type = ESiPCProperty(get_type, set_type, None)
	async = ESiPCProperty(get_async, set_async, None)
	defer = ESiPCProperty(get_defer, set_defer, None)

# ------------------------------------------------------------
## section
class MikanSectionViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanSectionViewlet, self).__init__(parent, "section")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## select
class MikanSelectViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, name=None, size=1.0, nodevalue=None, clazz=None):
		super(MikanSelectViewlet, self).__init__(parent, "select")

		if clazz:
			self.clazz = clazz
		self.set_name(name)
		self.set_size(size)
		self.nodevalue = nodevalue

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_size(self, value):
		self.set_attribute_value("size", value)

	def get_size(self):
		return self.get_attribute_value("size")

	def set_required(self, value):
		self.set_attribute_value("required", value)

	def get_required(self):
		return self.get_attribute_value("required")

	def set_autofocus(self, value):
		self.set_attribute_value("autofocus", value)

	def get_autofocus(self):
		return self.get_attribute_value("autofocus")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_multiple(self, value):
		self.set_attribute_value("multiple", value)

	def get_multiple(self):
		return self.get_attribute_value("multiple")

	# ----------------------------------------------------
	## Property
	name = ESiPCProperty(get_name, set_name, None)
	size = ESiPCProperty(get_size, set_size, None)
	required = ESiPCProperty(get_required, set_required, None)
	autofocus = ESiPCProperty(get_autofocus, set_autofocus, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)
	form = ESiPCProperty(get_form, set_form, None)
	multiple = ESiPCProperty(get_multiple, set_multiple, None)

# ------------------------------------------------------------
## small
class MikanSmallViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanSmallViewlet, self).__init__(parent, "small")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## source
class MikanSourceViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, src=None, type=None, media=None, nodevalue=None, clazz=None):
		super(MikanSourceViewlet, self).__init__(parent, "source")

		if clazz:
			self.clazz = clazz
		self.set_src(src)
		self.set_type(type)
		self.set_media(media)
		self.nodevalue = nodevalue

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_media(self, value):
		self.set_attribute_value("media", value)

	def get_media(self):
		return self.get_attribute_value("media")

	# ----------------------------------------------------
	## Property
	src = ESiPCProperty(get_src, set_src, None)
	type = ESiPCProperty(get_type, set_type, None)
	media = ESiPCProperty(get_media, set_media, None)

# ------------------------------------------------------------
## span
class MikanSpanViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanSpanViewlet, self).__init__(parent, "span")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## strong
class MikanStrongViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanStrongViewlet, self).__init__(parent, "strong")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## style
class MikanStyleViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, type=None, media=None, nodevalue=None, clazz=None):
		super(MikanStyleViewlet, self).__init__(parent, "style")

		if clazz:
			self.clazz = clazz
		self.set_type(type)
		self.set_media(media)
		self.nodevalue = nodevalue

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_media(self, value):
		self.set_attribute_value("media", value)

	def get_media(self):
		return self.get_attribute_value("media")

	def set_scoped(self, value):
		self.set_attribute_value("scoped", value)

	def get_scoped(self):
		return self.get_attribute_value("scoped")

	# ----------------------------------------------------
	## Property
	type = ESiPCProperty(get_type, set_type, None)
	media = ESiPCProperty(get_media, set_media, None)
	scoped = ESiPCProperty(get_scoped, set_scoped, None)

# ------------------------------------------------------------
## sub
class MikanSubViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanSubViewlet, self).__init__(parent, "sub")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## sup
class MikanSupViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanSupViewlet, self).__init__(parent, "sup")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## summary
class MikanSummaryViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanSummaryViewlet, self).__init__(parent, "summary")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## table
class MikanTableViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanTableViewlet, self).__init__(parent, "table")

		if clazz:
			self.clazz = clazz

	def set_border(self, value):
		self.set_attribute_value("border", value)

	def get_border(self):
		return self.get_attribute_value("border")

	# ----------------------------------------------------
	## Property
	border = ESiPCProperty(get_border, set_border, None)

# ------------------------------------------------------------
## tbody
class MikanTbodyViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanTbodyViewlet, self).__init__(parent, "tbody")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## td
class MikanTdViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, colspan=None, rowspan=None, nodevalue=None, clazz=None):
		super(MikanTdViewlet, self).__init__(parent, "td")

		if clazz:
			self.clazz = clazz
		self.set_colspan(colspan)
		self.set_rowspan(rowspan)
		self.nodevalue = nodevalue

	def set_colspan(self, value):
		self.set_attribute_value("colspan", value)

	def get_colspan(self):
		return self.get_attribute_value("colspan")

	def set_rowspan(self, value):
		self.set_attribute_value("rowspan", value)

	def get_rowspan(self):
		return self.get_attribute_value("rowspan")

	def set_headers(self, value):
		self.set_attribute_value("headers", value)

	def get_headers(self):
		return self.get_attribute_value("headers")

	# ----------------------------------------------------
	## Property
	colspan = ESiPCProperty(get_colspan, set_colspan, None)
	rowspan = ESiPCProperty(get_rowspan, set_rowspan, None)
	headers = ESiPCProperty(get_headers, set_headers, None)

# ------------------------------------------------------------
## thead
class MikanTheadViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanTheadViewlet, self).__init__(parent, "thead")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## tfoot
class MikanTfootViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanTfootViewlet, self).__init__(parent, "tfoot")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## textarea
class MikanTextareaViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, name=None, cols=None, rows=None, readonly=None, required=None, nodevalue=None, clazz=None):
		super(MikanTextareaViewlet, self).__init__(parent, "textarea")

		if clazz:
			self.clazz = clazz
		self.set_name(name)
		self.set_cols(cols)
		self.set_rows(rows)
		self.set_readonly(readonly)
		self.set_required(required)
		self.nodevalue = nodevalue

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_cols(self, value):
		self.set_attribute_value("cols", value)

	def get_cols(self):
		return self.get_attribute_value("cols")

	def set_rows(self, value):
		self.set_attribute_value("rows", value)

	def get_rows(self):
		return self.get_attribute_value("rows")

	def set_readonly(self, value):
		self.set_attribute_value("readonly", value)

	def get_readonly(self):
		return self.get_attribute_value("readonly")

	def set_required(self, value):
		self.set_attribute_value("required", value)

	def get_required(self):
		return self.get_attribute_value("required")

	def set_autofocus(self, value):
		self.set_attribute_value("autofocus", value)

	def get_autofocus(self):
		return self.get_attribute_value("autofocus")

	def set_dirname(self, value):
		self.set_attribute_value("dirname", value)

	def get_dirname(self):
		return self.get_attribute_value("dirname")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_maxlength(self, value):
		self.set_attribute_value("maxlength", value)

	def get_maxlength(self):
		return self.get_attribute_value("maxlength")

	def set_placeholder(self, value):
		self.set_attribute_value("placeholder", value)

	def get_placeholder(self):
		return self.get_attribute_value("placeholder")

	def set_wrap(self, value):
		self.set_attribute_value("wrap", value)

	def get_wrap(self):
		return self.get_attribute_value("wrap")

	# ----------------------------------------------------
	## Property
	name = ESiPCProperty(get_name, set_name, None)
	cols = ESiPCProperty(get_cols, set_cols, None)
	rows = ESiPCProperty(get_rows, set_rows, None)
	readonly = ESiPCProperty(get_readonly, set_readonly, None)
	required = ESiPCProperty(get_required, set_required, None)
	autofocus = ESiPCProperty(get_autofocus, set_autofocus, None)
	dirname = ESiPCProperty(get_dirname, set_dirname, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)
	form = ESiPCProperty(get_form, set_form, None)
	maxlength = ESiPCProperty(get_maxlength, set_maxlength, None)
	placeholder = ESiPCProperty(get_placeholder, set_placeholder, None)
	wrap = ESiPCProperty(get_wrap, set_wrap, None)

# ------------------------------------------------------------
## th
class MikanThViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, colspan=None, rowspan=None, nodevalue=None, clazz=None):
		super(MikanThViewlet, self).__init__(parent, "th")

		if clazz:
			self.clazz = clazz
		self.set_colspan(colspan)
		self.set_rowspan(rowspan)
		self.nodevalue = nodevalue

	def set_colspan(self, value):
		self.set_attribute_value("colspan", value)

	def get_colspan(self):
		return self.get_attribute_value("colspan")

	def set_rowspan(self, value):
		self.set_attribute_value("rowspan", value)

	def get_rowspan(self):
		return self.get_attribute_value("rowspan")

	def set_headers(self, value):
		self.set_attribute_value("headers", value)

	def get_headers(self):
		return self.get_attribute_value("headers")

	def set_scope(self, value):
		self.set_attribute_value("scope", value)

	def get_scope(self):
		return self.get_attribute_value("scope")

	def set_abbr(self, value):
		self.set_attribute_value("abbr", value)

	def get_abbr(self):
		return self.get_attribute_value("abbr")

	# ----------------------------------------------------
	## Property
	colspan = ESiPCProperty(get_colspan, set_colspan, None)
	rowspan = ESiPCProperty(get_rowspan, set_rowspan, None)
	headers = ESiPCProperty(get_headers, set_headers, None)
	scope = ESiPCProperty(get_scope, set_scope, None)
	abbr = ESiPCProperty(get_abbr, set_abbr, None)

# ------------------------------------------------------------
## time
class MikanTimeViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanTimeViewlet, self).__init__(parent, "time")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	def set_datetime(self, value):
		self.set_attribute_value("datetime", value)

	def get_datetime(self):
		return self.get_attribute_value("datetime")

	# ----------------------------------------------------
	## Property
	datetime = ESiPCProperty(get_datetime, set_datetime, None)

# ------------------------------------------------------------
## title
class MikanTitleViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanTitleViewlet, self).__init__(parent, "title")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## tr
class MikanTrViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, clazz=None):
		super(MikanTrViewlet, self).__init__(parent, "tr")

		if clazz:
			self.clazz = clazz

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## trace
class MikanTraceViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, src=None, srclang=None, label=None, clazz=None):
		super(MikanTraceViewlet, self).__init__(parent, "trace")

		if clazz:
			self.clazz = clazz
		self.set_src(src)
		self.set_srclang(srclang)
		self.set_label(label)

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_srclang(self, value):
		self.set_attribute_value("srclang", value)

	def get_srclang(self):
		return self.get_attribute_value("srclang")

	def set_label(self, value):
		self.set_attribute_value("label", value)

	def get_label(self):
		return self.get_attribute_value("label")

	def set_default(self, value):
		self.set_attribute_value("default", value)

	def get_default(self):
		return self.get_attribute_value("default")

	def set_kind(self, value):
		self.set_attribute_value("kind", value)

	def get_kind(self):
		return self.get_attribute_value("kind")

	# ----------------------------------------------------
	## Property
	src = ESiPCProperty(get_src, set_src, None)
	srclang = ESiPCProperty(get_srclang, set_srclang, None)
	label = ESiPCProperty(get_label, set_label, None)
	default = ESiPCProperty(get_default, set_default, None)
	kind = ESiPCProperty(get_kind, set_kind, None)

# ------------------------------------------------------------
## u
class MikanUViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanUViewlet, self).__init__(parent, "u")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## ul
class MikanUlViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanUlViewlet, self).__init__(parent, "ul")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## var
class MikanVarViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanVarViewlet, self).__init__(parent, "var")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## video
class MikanVideoViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, src=None, autoplay=None, loop=None, width=None, height=None, clazz=None):
		super(MikanVideoViewlet, self).__init__(parent, "video")

		if clazz:
			self.clazz = clazz
		self.set_src(src)
		self.set_autoplay(autoplay)
		self.set_loop(loop)
		self.set_width(width)
		self.set_height(height)

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_autoplay(self, value):
		self.set_attribute_value("autoplay", value)

	def get_autoplay(self):
		return self.get_attribute_value("autoplay")

	def set_loop(self, value):
		self.set_attribute_value("loop", value)

	def get_loop(self):
		return self.get_attribute_value("loop")

	def set_width(self, value):
		self.set_attribute_value("width", value)

	def get_width(self):
		return self.get_attribute_value("width")

	def set_height(self, value):
		self.set_attribute_value("height", value)

	def get_height(self):
		return self.get_attribute_value("height")

	def set_crossorigin(self, value):
		self.set_attribute_value("crossorigin", value)

	def get_crossorigin(self):
		return self.get_attribute_value("crossorigin")

	def set_poster(self, value):
		self.set_attribute_value("poster", value)

	def get_poster(self):
		return self.get_attribute_value("poster")

	def set_preload(self, value):
		self.set_attribute_value("preload", value)

	def get_preload(self):
		return self.get_attribute_value("preload")

	def set_mediagroup(self, value):
		self.set_attribute_value("mediagroup", value)

	def get_mediagroup(self):
		return self.get_attribute_value("mediagroup")

	def set_muted(self, value):
		self.set_attribute_value("muted", value)

	def get_muted(self):
		return self.get_attribute_value("muted")

	def set_controls(self, value):
		self.set_attribute_value("controls", value)

	def get_controls(self):
		return self.get_attribute_value("controls")

	# ----------------------------------------------------
	## Property
	src = ESiPCProperty(get_src, set_src, None)
	autoplay = ESiPCProperty(get_autoplay, set_autoplay, None)
	loop = ESiPCProperty(get_loop, set_loop, None)
	width = ESiPCProperty(get_width, set_width, None)
	height = ESiPCProperty(get_height, set_height, None)
	crossorigin = ESiPCProperty(get_crossorigin, set_crossorigin, None)
	poster = ESiPCProperty(get_poster, set_poster, None)
	preload = ESiPCProperty(get_preload, set_preload, None)
	mediagroup = ESiPCProperty(get_mediagroup, set_mediagroup, None)
	muted = ESiPCProperty(get_muted, set_muted, None)
	controls = ESiPCProperty(get_controls, set_controls, None)

# ------------------------------------------------------------
## wbr
class MikanWbrViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanWbrViewlet, self).__init__(parent, "wbr")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## frameset
class MikanFramesetViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, cols=None, rows=None, border=None, bordercolor=None, clazz=None):
		super(MikanFramesetViewlet, self).__init__(parent, "frameset")

		if clazz:
			self.clazz = clazz
		self.set_cols(cols)
		self.set_rows(rows)
		self.set_border(border)
		self.set_bordercolor(bordercolor)

	def set_cols(self, value):
		self.set_attribute_value("cols", value)

	def get_cols(self):
		return self.get_attribute_value("cols")

	def set_rows(self, value):
		self.set_attribute_value("rows", value)

	def get_rows(self):
		return self.get_attribute_value("rows")

	def set_border(self, value):
		self.set_attribute_value("border", value)

	def get_border(self):
		return self.get_attribute_value("border")

	def set_bordercolor(self, value):
		self.set_attribute_value("bordercolor", value)

	def get_bordercolor(self):
		return self.get_attribute_value("bordercolor")

	def set_frameborder(self, value):
		self.set_attribute_value("frameborder", value)

	def get_frameborder(self):
		return self.get_attribute_value("frameborder")

	def set_framespacing(self, value):
		self.set_attribute_value("framespacing", value)

	def get_framespacing(self):
		return self.get_attribute_value("framespacing")

	# ----------------------------------------------------
	## Property
	cols = ESiPCProperty(get_cols, set_cols, None)
	rows = ESiPCProperty(get_rows, set_rows, None)
	border = ESiPCProperty(get_border, set_border, None)
	bordercolor = ESiPCProperty(get_bordercolor, set_bordercolor, None)
	frameborder = ESiPCProperty(get_frameborder, set_frameborder, None)
	framespacing = ESiPCProperty(get_framespacing, set_framespacing, None)

# ------------------------------------------------------------
## noframes
class MikanNoframesViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, nodevalue=None, clazz=None):
		super(MikanNoframesViewlet, self).__init__(parent, "noframes")

		if clazz:
			self.clazz = clazz
		self.nodevalue = nodevalue

	# ----------------------------------------------------
	## Property

# ------------------------------------------------------------
## frame
class MikanFrameViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, src=None, name=None, frameborder=None, height=None, width=None, clazz=None):
		super(MikanFrameViewlet, self).__init__(parent, "frame")

		if clazz:
			self.clazz = clazz
		self.set_src(src)
		self.set_name(name)
		self.set_frameborder(frameborder)
		self.set_height(height)
		self.set_width(width)

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_frameborder(self, value):
		self.set_attribute_value("frameborder", value)

	def get_frameborder(self):
		return self.get_attribute_value("frameborder")

	def set_height(self, value):
		self.set_attribute_value("height", value)

	def get_height(self):
		return self.get_attribute_value("height")

	def set_width(self, value):
		self.set_attribute_value("width", value)

	def get_width(self):
		return self.get_attribute_value("width")

	def set_longdesc(self, value):
		self.set_attribute_value("longdesc", value)

	def get_longdesc(self):
		return self.get_attribute_value("longdesc")

	def set_marginwidth(self, value):
		self.set_attribute_value("marginwidth", value)

	def get_marginwidth(self):
		return self.get_attribute_value("marginwidth")

	def set_marginheight(self, value):
		self.set_attribute_value("marginheight", value)

	def get_marginheight(self):
		return self.get_attribute_value("marginheight")

	def set_noresize(self, value):
		self.set_attribute_value("noresize", value)

	def get_noresize(self):
		return self.get_attribute_value("noresize")

	def set_scrolling(self, value):
		self.set_attribute_value("scrolling", value)

	def get_scrolling(self):
		return self.get_attribute_value("scrolling")

	# ----------------------------------------------------
	## Property
	src = ESiPCProperty(get_src, set_src, None)
	name = ESiPCProperty(get_name, set_name, None)
	frameborder = ESiPCProperty(get_frameborder, set_frameborder, None)
	height = ESiPCProperty(get_height, set_height, None)
	width = ESiPCProperty(get_width, set_width, None)
	longdesc = ESiPCProperty(get_longdesc, set_longdesc, None)
	marginwidth = ESiPCProperty(get_marginwidth, set_marginwidth, None)
	marginheight = ESiPCProperty(get_marginheight, set_marginheight, None)
	noresize = ESiPCProperty(get_noresize, set_noresize, None)
	scrolling = ESiPCProperty(get_scrolling, set_scrolling, None)

# ------------------------------------------------------------
## input
class MikanInputViewlet(MikanHTMLElementViewlet):

	def __init__(self, parent, name=None, type=None, value=None, clazz=None):
		super(MikanInputViewlet, self).__init__(parent, "input")

		if clazz:
			self.clazz = clazz
		self.set_name(name)
		self.set_type(type)
		self.set_value(value)

	def get_default_nodevalue(self):
		return None

	def set_name(self, value):
		self.set_attribute_value("name", value)

	def get_name(self):
		return self.get_attribute_value("name")

	def set_type(self, value):
		self.set_attribute_value("type", value)

	def get_type(self):
		return self.get_attribute_value("type")

	def set_value(self, value):
		self.set_attribute_value("value", value)

	def get_value(self):
		return self.get_attribute_value("value")

	def set_multiple(self, value):
		self.set_attribute_value("multiple", value)

	def get_multiple(self):
		return self.get_attribute_value("multiple")

	def set_width(self, value):
		self.set_attribute_value("width", value)

	def get_width(self):
		return self.get_attribute_value("width")

	def set_readonly(self, value):
		self.set_attribute_value("readonly", value)

	def get_readonly(self):
		return self.get_attribute_value("readonly")

	def set_required(self, value):
		self.set_attribute_value("required", value)

	def get_required(self):
		return self.get_attribute_value("required")

	def set_maxlength(self, value):
		self.set_attribute_value("maxlength", value)

	def get_maxlength(self):
		return self.get_attribute_value("maxlength")

	def set_accept(self, value):
		self.set_attribute_value("accept", value)

	def get_accept(self):
		return self.get_attribute_value("accept")

	def set_alt(self, value):
		self.set_attribute_value("alt", value)

	def get_alt(self):
		return self.get_attribute_value("alt")

	def set_autocomplete(self, value):
		self.set_attribute_value("autocomplete", value)

	def get_autocomplete(self):
		return self.get_attribute_value("autocomplete")

	def set_autofocus(self, value):
		self.set_attribute_value("autofocus", value)

	def get_autofocus(self):
		return self.get_attribute_value("autofocus")

	def set_checked(self, value):
		self.set_attribute_value("checked", value)

	def get_checked(self):
		return self.get_attribute_value("checked")

	def set_disabled(self, value):
		self.set_attribute_value("disabled", value)

	def get_disabled(self):
		return self.get_attribute_value("disabled")

	def set_form(self, value):
		self.set_attribute_value("form", value)

	def get_form(self):
		return self.get_attribute_value("form")

	def set_formaction(self, value):
		self.set_attribute_value("formaction", value)

	def get_formaction(self):
		return self.get_attribute_value("formaction")

	def set_formenctype(self, value):
		self.set_attribute_value("formenctype", value)

	def get_formenctype(self):
		return self.get_attribute_value("formenctype")

	def set_formmethod(self, value):
		self.set_attribute_value("formmethod", value)

	def get_formmethod(self):
		return self.get_attribute_value("formmethod")

	def set_formnovalidate(self, value):
		self.set_attribute_value("formnovalidate", value)

	def get_formnovalidate(self):
		return self.get_attribute_value("formnovalidate")

	def set_formtarget(self, value):
		self.set_attribute_value("formtarget", value)

	def get_formtarget(self):
		return self.get_attribute_value("formtarget")

	def set_height(self, value):
		self.set_attribute_value("height", value)

	def get_height(self):
		return self.get_attribute_value("height")

	def set_list(self, value):
		self.set_attribute_value("list", value)

	def get_list(self):
		return self.get_attribute_value("list")

	def set_max(self, value):
		self.set_attribute_value("max", value)

	def get_max(self):
		return self.get_attribute_value("max")

	def set_min(self, value):
		self.set_attribute_value("min", value)

	def get_min(self):
		return self.get_attribute_value("min")

	def set_pattern(self, value):
		self.set_attribute_value("pattern", value)

	def get_pattern(self):
		return self.get_attribute_value("pattern")

	def set_placeholder(self, value):
		self.set_attribute_value("placeholder", value)

	def get_placeholder(self):
		return self.get_attribute_value("placeholder")

	def set_size(self, value):
		self.set_attribute_value("size", value)

	def get_size(self):
		return self.get_attribute_value("size")

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def get_src(self):
		return self.get_attribute_value("src")

	def set_step(self, value):
		self.set_attribute_value("step", value)

	def get_step(self):
		return self.get_attribute_value("step")

	# ----------------------------------------------------
	## Property
	name = ESiPCProperty(get_name, set_name, None)
	type = ESiPCProperty(get_type, set_type, None)
	value = ESiPCProperty(get_value, set_value, None)
	multiple = ESiPCProperty(get_multiple, set_multiple, None)
	width = ESiPCProperty(get_width, set_width, None)
	readonly = ESiPCProperty(get_readonly, set_readonly, None)
	required = ESiPCProperty(get_required, set_required, None)
	maxlength = ESiPCProperty(get_maxlength, set_maxlength, None)
	accept = ESiPCProperty(get_accept, set_accept, None)
	alt = ESiPCProperty(get_alt, set_alt, None)
	autocomplete = ESiPCProperty(get_autocomplete, set_autocomplete, None)
	autofocus = ESiPCProperty(get_autofocus, set_autofocus, None)
	checked = ESiPCProperty(get_checked, set_checked, None)
	disabled = ESiPCProperty(get_disabled, set_disabled, None)
	form = ESiPCProperty(get_form, set_form, None)
	formaction = ESiPCProperty(get_formaction, set_formaction, None)
	formenctype = ESiPCProperty(get_formenctype, set_formenctype, None)
	formmethod = ESiPCProperty(get_formmethod, set_formmethod, None)
	formnovalidate = ESiPCProperty(get_formnovalidate, set_formnovalidate, None)
	formtarget = ESiPCProperty(get_formtarget, set_formtarget, None)
	height = ESiPCProperty(get_height, set_height, None)
	list = ESiPCProperty(get_list, set_list, None)
	max = ESiPCProperty(get_max, set_max, None)
	min = ESiPCProperty(get_min, set_min, None)
	pattern = ESiPCProperty(get_pattern, set_pattern, None)
	placeholder = ESiPCProperty(get_placeholder, set_placeholder, None)
	size = ESiPCProperty(get_size, set_size, None)
	src = ESiPCProperty(get_src, set_src, None)
	step = ESiPCProperty(get_step, set_step, None)



# ------------------------------------------------------------ ------------------------------------------------------------
# ------------------------------------------------------------ ------------------------------------------------------------
# ------------------------------------------------------------ ------------------------------------------------------------

class MikanMetaContentStyleTypeViewlet(MikanMetaViewlet):

	def __init__(self, parent):
		super(MikanMetaContentStyleTypeViewlet, self).__init__(parent, None, "text/css", "Content-Style-Type")

class MikanMetaContentLanguageViewlet(MikanMetaViewlet):

	def __init__(self, parent):
		super(MikanMetaContentLanguageViewlet, self).__init__(parent, None, "ja", "Content-Language")

class MikanMetaContentTypeViewlet(MikanMetaViewlet):

	def __init__(self, parent):
		super(MikanMetaContentTypeViewlet, self).__init__(parent, None, parent.htmlview.contenttype + "; charset=" + parent.request.encode, "Content-Type")

class MikanMetaKeywordsViewlet(MikanMetaViewlet):

	def __init__(self, parent, keywords):
		super(MikanMetaKeywordsViewlet, self).__init__(parent, "keywords", keywords)

class MikanMetaDescriptionViewlet(MikanMetaViewlet):

	def __init__(self, parent, description):
		super(MikanMetaDescriptionViewlet, self).__init__(parent, "description", description)

class MikanMetaRobotViewlet(MikanMetaViewlet):

	def __init__(self, parent, robots="noindex,nofollow"):
		super(MikanMetaRobotViewlet, self).__init__(parent, "robots", robots)

class MikanMetaAutherViewlet(MikanMetaViewlet):

	def __init__(self, parent, auther=""):
		super(MikanMetaAutherViewlet, self).__init__(parent, "auther", auther)

class MikanMetaCompatibleViewlet(MikanMetaViewlet):

	def __init__(self, parent, ie="edge"):
		super(MikanMetaCompatibleViewlet, self).__init__(parent, httpequiv="X-UA-Compatible", content="IE="+ie)

class MikanMetaViewportViewlet(MikanMetaViewlet):

	def __init__(self, parent, viewport=""):
		super(MikanMetaViewportViewlet, self).__init__(parent, "viewport", viewport)

class MikanCSSViewlet(MikanLinkViewlet):

	def __init__(self, parent, href):
		super(MikanCSSViewlet, self).__init__(parent, "stylesheet", href, "text/css")
		self.sortkey = 10

class MikanJSViewlet(MikanElementViewlet):

	def get_src(self):
		return self.get_attribute_value("src")

	def set_src(self, value):
		self.set_attribute_value("src", value)

	def __init__(self, parent, src=None, value=";"):
		super(MikanJSViewlet, self).__init__(parent, "script")

		self.set_src(src)
		self.set_attribute_value("type", "text/javascript")
		self.nodevalue = value
		self.sortkey = 30

	# ----------------------------------------------------
	## Property
	src = ESiPCProperty(get_src, set_src, None)

# -----------------------------------------------------
class MikanToolbarButtonViewlet(MikanSpanViewlet):
	def __init__(self, parent, href, target, alt, src):
		super(MikanToolbarButtonViewlet, self).__init__(parent)

		self.clazz = "toolbar_button"
		self.FA = MikanAViewlet(self, href, target)
		self.FImg = MikanImgViewlet(self, alt, src, "icon_small")

	def get_a(self):
		return self.FA

	def get_img(self):
		return self.FImg

	# ----------------------------------------------------
	## Property
	a = ESiPCProperty(get_a, None, None)
	img = ESiPCProperty(get_img, None, None)

class MikanMenuButtonViewlet(MikanDivViewlet):
	def __init__(self, parent, href, target, title, src, _class="menu"):
		super(MikanMenuButtonViewlet, self).__init__(parent)

		self.clazz = _class

		self.FA = MikanAViewlet(self,  href, target)
		self.FImg = MikanImgViewlet(self.a, title, src, "icon_small")
		self.FTitle = MikanTextViewlet(self.a, title)

	def get_a(self):
		return self.FA

	def get_img(self):
		return self.FImg

	# ----------------------------------------------------
	## Property
	a = ESiPCProperty(get_a, None, None)
	img = ESiPCProperty(get_img, None, None)

class MikanPageBarViewlet(MikanDivViewlet):
	def __init__(self, parent):
		super(MikanPageBarViewlet, self).__init__(parent)

		self.clazz = "pagebar"

class MikanHeaderBarButtonViewlet(MikanThViewlet):

	def get_a(self):
		return self.FA

	def get_img(self):
		return self.FImg

	def get_title(self):
		return self.FTitle

	def __init__(self, parent, href, target, title, src, _class="headerbar", onclick=None):
		super(MikanHeaderBarButtonViewlet, self).__init__(parent)

		self.clazz = _class

		self.FA = MikanAViewlet(self,  href, target)
		if (onclick != None):
			self.a.onclick = onclick
		self.FImg = MikanImgViewlet(self.a, title, src, "icon_small")
		self.FTitle = MikanTextViewlet(self.a, title)

	# ----------------------------------------------------
	## Property
	a = ESiPCProperty(get_a, None, None)
	img = ESiPCProperty(get_img, None, None)
	title = ESiPCProperty(get_title, None, None)

# ------------------------------------------------------------
## Mikan ヘッダバー ビューレットクラス
#
class MikanHeaderBarTopViewlet(MikanTableViewlet):

	def get_tr(self):
		return self.FTr

	def get_site_title(self):
		return self.FSiteTitle

	def set_buttons(self, value):
		self.FButtons = value

	def get_buttons(self):
		return self.FButtons

	def __init__(self, parent, buttons=None):
		super(MikanHeaderBarTopViewlet, self).__init__(parent)

		self.clazz = "headerbar"

		self.FTr = MikanTrViewlet(self)

		self.FSiteTitle = MikanHeaderBarButtonViewlet(self.tr, self.request.wsgiurl+ "/", None, self.request.get_config_value("site", "title"), self.request.imageurl + "site.png")

		self.FButtons = buttons

	def perform(self):
		if (self.buttons != None):
			for b in self.buttons:
				MikanHeaderBarButtonViewlet(self.tr, b.url, b.target, b.title, b.icon, "headerbar", b.onclick)

		return super(MikanHeaderBarTopViewlet, self).perform()

	# ----------------------------------------------------
	## Property
	tr = ESiPCProperty(get_tr, None, None)
	sitetitle = ESiPCProperty(get_site_title, None, None)
	buttons = ESiPCProperty(get_buttons, set_buttons, None)

# ------------------------------------------------------------
## Mikan ヘッダバー ビューレットクラス
#
class MikanHeaderBarTitleViewlet(MikanTableViewlet):

	def get_tr(self):
		return self.FTr

	def get_site_title(self):
		return self.FSiteTitle

	def get_site_banner(self):
		return self.FSiteBanner

	def set_page_title(self ,value):
		self.sitetitle.nodevalue = value

	def get_page_title(self):
		return self.sitetitle.nodevalue

	def __init__(self, parent):
		super(MikanHeaderBarTitleViewlet, self).__init__(parent)

		self.clazz = "sub_header"

		self.FTr = MikanTrViewlet(self)

		self.FSiteTitle = MikanTdViewlet(self.tr)
		self.FSiteTitle.nodevalue = self.request.get_config_value("site", "title")
		b = MikanTdViewlet(self.tr)
		b.clazz = "sub_banner"
		self.FSiteBanner = MikanImgViewlet(b, u"", self.request.imageurl + "logo.gif", "sub_banner")

	# ----------------------------------------------------
	## Property
	tr = ESiPCProperty(get_tr, None, None)
	sitetitle = ESiPCProperty(get_site_title, None, None)
	sitebanner = ESiPCProperty(get_site_banner, None, None)
	pagetitle = ESiPCProperty(get_page_title, set_page_title, None)


# ------------------------------------------------------------
## Mikan フッタバー ビューレットクラス
#
class MikanFootBarViewlet(MikanDivViewlet):

	def get_auther(self):
		return self.FAuther

	def get_copyright(self):
		return self.FCopyright

	def get_confidential(self):
		return self.FConfidential

	def get_system(self):
		return self.FSystem

	def get_version(self):
		return self.FVersion

	def __init__(self, parent):
		super(MikanFootBarViewlet, self).__init__(parent)
		self.clazz = "sub_footer"

		self.FVersion = MikanFootTextViewlet(self, u"%s Version.%s" % (self.request.sitesystem, self.request.siteversion))
		self.version.sortkey = 10000
		self.FSystem = MikanFootTextViewlet(self, self.request.sitesystem)
		self.system.isvisible = False
		self.system.sortkey = 10000
		self.FAuther = MikanFootTextViewlet(self, self.request.siteauther)
		self.auther.sortkey = 10100
		self.FCopyright = MikanFootTextViewlet(self, self.request.sitecopyright)
		self.copyright.sortkey = 10200
		self.FConfidential = MikanFootTextViewlet(self, self.request.siteconfidential)
		self.confidential.sortkey = 10300

	# ----------------------------------------------------
	## Property
	auther = ESiPCProperty(get_auther, None, None)
	copyright = ESiPCProperty(get_copyright, None, None)
	version = ESiPCProperty(get_version, None, None)
	system = ESiPCProperty(get_system, None, None)
	confidential = ESiPCProperty(get_confidential, None, None)

# ------------------------------------------------------------
## Mikan 例外 ビューレットクラス
#
class MikanExceptionsViewlet(MikanDivViewlet):
	def __init__(self, parent):
		super(MikanExceptionsViewlet, self).__init__(parent)

		self.clazz = "exception"

	def prepare(self):
		return len(self.request.exceptions) > 0

	def perform(self):
		for e in self.request.exceptions:
			if self.islogdebug:
				self.logger.debug(e)

			msg = ""
			try:
				msg = e.__str__()
			except:
				msg = e
			try:
				msg = msg.decode(sys.getdefaultencoding())
			except:
				try:
					msg = msg.decode("shift_jis")
				except:
					msg = msg

			MikanExceptionMessageViewlet(self, msg)

		return super(MikanExceptionsViewlet, self).perform()

# ------------------------------------------------------------
## Mikan フッタバー ビューレットクラス
#
class MikanExceptionMessageViewlet(MikanDivViewlet):
	def __init__(self, parent, value):
		super(MikanExceptionMessageViewlet, self).__init__(parent, nodevalue=value)

		self.clazz = "exception_message"

# ------------------------------------------------------------
## Mikan フッタバー ビューレットクラス
#
class MikanFootTextViewlet(MikanDivViewlet):
	def __init__(self, parent, value):
		super(MikanFootTextViewlet, self).__init__(parent, value)

		self.clazz = "footer_copyright"
# ------------------------------------------------------------
## Mikan メニューバー ビューレットクラス
#
class MikanMenuBarTitleViewlet(MikanTableViewlet):

	def set_menus(self, value):
		self.FMenus = value

	def get_menus(self):
		return self.FMenus

	def get_table(self):
		return self.FTable

	def __init__(self, parent, menus=None):
		super(MikanMenuBarTitleViewlet, self).__init__(parent)

		self.clazz = "headerbar"

		tr = MikanTrViewlet(self)
		tr.clazz = "headerbar"

		td = MikanTdViewlet(tr)
		td.clazz = "headerbar"

		div = MikanDivViewlet(td)
		div.clazz = "menus"

		self.FTable = MikanTableViewlet(div)
		self.FTable.clazz = "menu_tab"

		self.FMenus = menus

	def build_menus(self, menus, element, tag="div", c="menu_popupmenu", tag_td="td"):
		if (element == None):
			return

		if (menus != None):
			d = MikanHTMLElementViewlet(element, tag)
			d.clazz = c

			for m in menus:
				if (m.url == None):
					th = MikanThViewlet(d)
					th.clazz = "menu_title"
					if (m.icon != None):
						img = MikanImgViewlet(th, m.title, m.icon, "icon_small")
					th.FValue = m.title
				else:
					td = MikanHTMLElementViewlet(d, tag_td)
					td.clazz = "menu"
					td.FOnMouseOut = "hidePopupMenu(this,\'menu_popupmenu\');"
					td.FOnMouseOver = "showPopupMenu(this,\'menu_popupmenu\');"
					a = MikanAViewlet(td,  m.url, m.target)
					a.clazz = "menu_button"
					if (m.icon != None):
						img = MikanImgViewlet(a, m.title, m.icon, "icon_small")
					title = MikanTextViewlet(a, m.title)

					if (m.menus != None):
						if (len(m.menus) != 0):
							MikanBrViewlet(td).clazz = "menu"
							self.build_menus(m.menus, td, "div", "menu_popupmenu", "div")

	def perform(self):
		self.build_menus(self.menus, self.table, "tr", "menu")

		return super(MikanMenuBarTitleViewlet, self).perform()

	# ----------------------------------------------------
	## Property
	menus = ESiPCProperty(get_menus, set_menus, None)
	table = ESiPCProperty(get_table, None, None)

class MikanHiddenInputViewlet(MikanInputViewlet):
	def __init__(self, parent, name, value):
		super(MikanHiddenInputViewlet, self).__init__(parent, name, "hidden", value)

class MikanCheckboxInputViewlet(MikanInputViewlet):
	def __init__(self, parent, name, value):
		super(MikanCheckboxInputViewlet, self).__init__(parent, name, "checkbox", value)

class MikanRadioInputViewlet(MikanInputViewlet):
	def __init__(self, parent, name, value):
		super(MikanRadioInputViewlet, self).__init__(parent, name, "radio", value)

class MikanTextInputViewlet(MikanInputViewlet):
	def __init__(self, parent, name, value, size, maxlength):
		super(MikanTextInputViewlet, self).__init__(parent, name, "text", value)

		self.size = size
		self.maxlength = maxlength

class MikanPasswordInputViewlet(MikanInputViewlet):
	def __init__(self, parent, name, size, maxlength, nodevalue=""):
		super(MikanPasswordInputViewlet, self).__init__(parent, name, "password", nodevalue)

		self.size = size
		self.maxlength = maxlength

class MikanResetInputViewlet(MikanInputViewlet):
	def __init__(self, parent, value=u"取消"):
		super(MikanResetInputViewlet, self).__init__(parent, "reset", "reset", value)

class MikanSubmitInputViewlet(MikanInputViewlet):
	def __init__(self, parent, value=u"実行"):
		super(MikanSubmitInputViewlet, self).__init__(parent, "submit", "submit", value)

class MikanButtonInputViewlet(MikanInputViewlet):
	def __init__(self, parent, name, value):
		super(MikanButtonInputViewlet, self).__init__(parent, name=name, type="button", value=value)

class MikanFileInputViewlet(MikanInputViewlet):
	def __init__(self, parent, name, size="120"):
		super(MikanFileInputViewlet, self).__init__(parent, name, "file")

		self.FSize = size

	def perform(self):
		return super(MikanFileInputViewlet, self).perform()



class MikanLoadedPageViewlet(MikanJSViewlet):
	def __init__(self, parent):
		super(MikanLoadedPageViewlet, self).__init__(parent)
		self.sortkey = 1000

	def prepare(self):
		if len(self.htmlview.loadedpage) == 0:
			return False

		sc = u""
		for l in self.htmlview.loadedpage:
			sc = u"%s\n%s" % (sc, l)

		MikanCDataViewlet(self, text=u"""
function loadedPage() {
%s
}
""" % sc)



		return super(MikanLoadedPageViewlet, self).prepare()


def conv_encoding(data, to_enc="utf_8"):
	lookup = ('utf_8', 'euc_jp', 'euc_jis_2004', 'euc_jisx0213',
		'shift_jis', 'shift_jis_2004','shift_jisx0213',
		'iso2022jp', 'iso2022_jp_1', 'iso2022_jp_2', 'iso2022_jp_3',
		'iso2022_jp_ext','latin_1', 'ascii')
	for encoding in lookup:
		try:
			data = data.decode(encoding)
#			print encoding
			break
		except:
			pass
	if isinstance(data, unicode):
		return data.encode(to_enc)
	else:
		return ""


# ------------------------------------------------------------
## メイン関数
# ------------------------------------------------------------
## メイン処理
if __name__ == '__main__':
	pass

# ------------------------------------------------------------
